PrevDay lgging fixed
parent
3cc63e2a3e
commit
f43b1e6ee3
|
|
@ -14,8 +14,8 @@ WIDGETS = {};
|
||||||
|
|
||||||
var batChartFile; // file for battery percentage recording
|
var batChartFile; // file for battery percentage recording
|
||||||
const recordingInterval10Min = 60 * 10 * 1000;
|
const recordingInterval10Min = 60 * 10 * 1000;
|
||||||
const recordingInterval1Min = 60*1000; //For testing
|
const recordingInterval1Min = 60*1000; //For testing
|
||||||
const recordingInterval10S = 10*1000; //For testing
|
const recordingInterval10S = 10*1000; //For testing
|
||||||
var recordingInterval = null;
|
var recordingInterval = null;
|
||||||
|
|
||||||
var compassEventReceived = false;
|
var compassEventReceived = false;
|
||||||
|
|
@ -67,7 +67,7 @@ WIDGETS = {};
|
||||||
enabledConsumers = enabledConsumers | switchableConsumers.hrm;
|
enabledConsumers = enabledConsumers | switchableConsumers.hrm;
|
||||||
//if (Bangle.isBluetoothOn())
|
//if (Bangle.isBluetoothOn())
|
||||||
// enabledConsumers = enabledConsumers | switchableConsumers.bluetooth;
|
// enabledConsumers = enabledConsumers | switchableConsumers.bluetooth;
|
||||||
|
|
||||||
// Reset the event registration vars
|
// Reset the event registration vars
|
||||||
compassEventReceived = false;
|
compassEventReceived = false;
|
||||||
gpsEventReceived = false;
|
gpsEventReceived = false;
|
||||||
|
|
@ -84,7 +84,8 @@ WIDGETS = {};
|
||||||
const logFileName = "bclog" + currentWriteDay;
|
const logFileName = "bclog" + currentWriteDay;
|
||||||
|
|
||||||
// Change log target on day change
|
// Change log target on day change
|
||||||
if (previousWriteDay != currentWriteDay) {
|
if (previousWriteDay != NaN
|
||||||
|
&& previousWriteDay != currentWriteDay) {
|
||||||
//Remove a log file containing data from a week ago
|
//Remove a log file containing data from a week ago
|
||||||
Storage.open(logFileName, "r").erase();
|
Storage.open(logFileName, "r").erase();
|
||||||
Storage.open(previousWriteLogName, "w").write(parseInt(currentWriteDay));
|
Storage.open(previousWriteLogName, "w").write(parseInt(currentWriteDay));
|
||||||
|
|
@ -110,6 +111,7 @@ WIDGETS = {};
|
||||||
reload();
|
reload();
|
||||||
Bangle.drawWidgets(); // relayout all widgets
|
Bangle.drawWidgets(); // relayout all widgets
|
||||||
}};
|
}};
|
||||||
|
|
||||||
// load settings, set correct widget width
|
// load settings, set correct widget width
|
||||||
reload();
|
reload();
|
||||||
})()
|
})()
|
||||||
Loading…
Reference in New Issue