Merge branch 'develop' of https://git.timovolkmann.de/tvolkmann/gyrogpsc into develop
This commit is contained in:
commit
0c8cc110ab
@ -108,9 +108,7 @@ func (t *TrackingService) StartLivetracking(cols ...CollectorType) (string, erro
|
||||
return "RECORDING", errors.New(txt)
|
||||
}
|
||||
if t.opMode == REPLAY {
|
||||
txt := "trackingservice: please stop Replay before resetting pipeline"
|
||||
logrus.Warn(txt)
|
||||
return "RECORDING", errors.New(txt)
|
||||
t.StopAll()
|
||||
}
|
||||
if t.opMode == LIVE {
|
||||
txt := "trackingservice: stop tracking running stream before creating new one"
|
||||
|
||||
@ -65,6 +65,7 @@ window.addEventListener("load", function(evt) {
|
||||
trackings = r.data
|
||||
let sel = document.getElementById("meas")
|
||||
sel.innerHTML = ''
|
||||
r.data.sort((a,b) => new Date(b.TimeCreated).getTime() - new Date(a.TimeCreated).getTime());
|
||||
r.data.forEach(tracking => {
|
||||
console.log(tracking)
|
||||
var option = document.createElement("option");
|
||||
|
||||
@ -1,19 +1,34 @@
|
||||
const GRAPH_RES = 100;
|
||||
var dataSmartphone = [];
|
||||
var ws;
|
||||
|
||||
|
||||
window.addEventListener("load", function(evt) {
|
||||
var output = document.getElementById("output");
|
||||
var checkBoxSmartphone = document.getElementById("checkbox1");
|
||||
var checkBoxUblox = document.getElementById("checkbox2");
|
||||
var ws;
|
||||
ws = new WebSocket("ws://localhost:3011/ws");
|
||||
ws.onopen = function(evt) {
|
||||
print("OPEN");
|
||||
}
|
||||
ws.onclose = function(evt) {
|
||||
|
||||
const wsOnCloseF = function (evt) {
|
||||
ws = null;
|
||||
print2("CLOSE");
|
||||
var intervalId;
|
||||
intervalId = setInterval(() => {
|
||||
console.log("reconnect websocket...")
|
||||
if (ws !== null && ws.CONNECTING) {
|
||||
return
|
||||
}
|
||||
if (ws !== null && ws.OPEN) {
|
||||
clearInterval(intervalId)
|
||||
return
|
||||
}
|
||||
ws = new WebSocket("ws://localhost:3011/ws");
|
||||
ws.onopen = wsOnOpenF
|
||||
ws.onclose = wsOnCloseF
|
||||
ws.onmessage = wsOnMessageF
|
||||
ws.onerror = wsOnErrorF
|
||||
}, 1000)
|
||||
}
|
||||
ws.onmessage = function(evt) {
|
||||
const wsOnMessageF = function (evt) {
|
||||
//print2("RESPONSE: " + evt.data);
|
||||
// let dat = JSON.parse(evt.data)["bmi26x gyroscope"]
|
||||
// let dat = JSON.parse(evt.data)["lsm6dsm gyroscope"]
|
||||
@ -89,10 +104,20 @@ window.addEventListener("load", function(evt) {
|
||||
console.log("no TCP acc")
|
||||
}
|
||||
}
|
||||
|
||||
ws.onerror = function(evt) {
|
||||
print("ERROR: " + evt.data);
|
||||
const wsOnOpenF = function (evt) {
|
||||
print2("OPEN");
|
||||
}
|
||||
const wsOnErrorF = function(evt) {
|
||||
console.log(evt)
|
||||
print2("ERROR: " + evt);
|
||||
}
|
||||
|
||||
|
||||
ws = new WebSocket("ws://localhost:3011/ws");
|
||||
ws.onopen = wsOnOpenF
|
||||
ws.onclose = wsOnCloseF
|
||||
ws.onmessage = wsOnMessageF
|
||||
ws.onerror = wsOnErrorF
|
||||
|
||||
|
||||
|
||||
@ -178,7 +203,7 @@ window.addEventListener("load", function(evt) {
|
||||
.then(console.log);
|
||||
checkBoxSmartphone.disabled = false;
|
||||
checkBoxUblox.disabled = false;
|
||||
document.getElementById("tracking state").innerHTML = "Tracking state: PIPELINE CLOSED"
|
||||
document.getElementById("tracking state").innerHTML = "Tracking state: CLOSED"
|
||||
//ws.close();
|
||||
}
|
||||
return false;
|
||||
@ -194,6 +219,7 @@ window.addEventListener("load", function(evt) {
|
||||
}
|
||||
trackings = r.data
|
||||
let sel = document.getElementById("meas")
|
||||
r.data.sort((a,b) => new Date(b.TimeCreated).getTime() - new Date(a.TimeCreated).getTime());
|
||||
r.data.forEach(tracking => {
|
||||
console.log(tracking)
|
||||
var option = document.createElement("option");
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<label id="SERIALlat" style= "font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif">Ublox lat: </label>
|
||||
</td>
|
||||
<td valign="top" width="100%">
|
||||
<div id="output"></div>
|
||||
<div id="output"><p>.</p></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user