Skip to content

Commit b310258

Browse files
pad graph data with 2 min, in data gaps >3min
1 parent d7c2631 commit b310258

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 262
2+
# version 263
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&language=en_us&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

js/tracker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,11 +835,12 @@ function graphAddLastPosition(idx) {
835835

836836
//insert gap when there are 3mins, or more, without telemetry
837837
var gap_size = 180000; // 3 mins in milis
838+
var pad_size = 120000; // 2 min
838839

839840
if(ts_last + gap_size < ts) {
840841
$.each(data, function(k,v) {
841-
v.data.push([ts_last+gap_size, v.data[v.data.length - 1][1]]);
842-
v.data.push([ts_last+gap_size+1, null]);
842+
v.data.push([ts_last+pad_size, v.data[v.data.length - 1][1]]);
843+
v.data.push([ts_last+pad_size+1, null]);
843844
v.nulls += 2;
844845
})
845846
}

0 commit comments

Comments
 (0)