projects
/
spd
/
sensor-hub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
777c211
)
Avoid plotting invalid temperature sensor values.
author
Pat Thoyts
<Patrick.Thoyts@renishaw.com>
Fri, 13 May 2016 09:27:34 +0000
(10:27 +0100)
committer
Pat Thoyts
<Patrick.Thoyts@renishaw.com>
Fri, 13 May 2016 09:27:34 +0000
(10:27 +0100)
static/sensor-hub.html
patch
|
blob
|
history
diff --git
a/static/sensor-hub.html
b/static/sensor-hub.html
index 61749069d911642d880c255d3defe47f880e81b9..1aa39fa5eb10aa9cb7f35e39bd4c9053a215afb6 100644
(file)
--- a/
static/sensor-hub.html
+++ b/
static/sensor-hub.html
@@
-112,7
+112,10
@@
function on_draw_graph(data) {
$.each(data.result, function(i,item) {
var t = item.timestamp*1000;
$.each(item.sensors, function(n, sensor) {
- plotdata[n].data.push([t,sensor.value]);
+ var v = sensor.value;
+ if (v < -100)
+ v = plotdata[n].data[plotdata[n].data.length - 1];
+ plotdata[n].data.push([t,v]);
});
});
$('#status').html('');