summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2018-04-18 13:20:32 +0200
committerVincent Guittot <vincent.guittot@linaro.org>2018-04-18 13:20:32 +0200
commitd11c0ad15e5486ed4b370001ffcd6cf0bda66fd8 (patch)
treee2f6eeefdbc14e93c2df6a63ae30edbc220414b9
parentf2e186e0ecac76dc75783657b8462d94b4289b73 (diff)
support file without timestamp
At now assume 10khz sampling rating. TODO : add field to set sampling rate
-rw-r--r--display_power.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/display_power.html b/display_power.html
index cbdbe3f..78ad426 100644
--- a/display_power.html
+++ b/display_power.html
@@ -141,7 +141,7 @@
var csvmode = document.getElementById('csv_mode').checked;
var offset = -1;
- var time_idx = 0;
+ var time_idx = -1;
var unit_mul = 0;
if (relativemode == 0)
@@ -206,12 +206,15 @@
var Xindex;
if (decimatemode && ((lineNo % 10) != 0))
return;
-
+ if (time_idx == -1)
+ Xindex = lineNo * 0.0001 * 1000;
+ else {
if (unit_mul == 0)
Xindex = parseFloat(items[time_idx])*1000;
else
Xindex = parseInt(items[time_idx])/1000;
-
+ }
+
if (offset == -1)
offset = Xindex;