mirror of https://github.com/espruino/BangleApps
sleepphasealarm: loggin on Bangle 1
Limit logging on Bangle.js 1 to one day due to low memorypull/2563/head
parent
1174faafbf
commit
3ada593477
|
@ -15,3 +15,4 @@
|
|||
0.12: Support javascript command to execute as defined in scheduler 'js' configuration
|
||||
0.13: Fix dated events alarm on wrong date
|
||||
0.14: Reduce update interval of current time when seconds are not shown
|
||||
Limit logging on Bangle.js 1 to one day due to low memory
|
||||
|
|
|
@ -23,6 +23,7 @@ Replacing the watch strap with a more comfortable one (e.g. made of nylon) is re
|
|||
## Logging
|
||||
|
||||
For each day of month (1..31) the ESS states are logged. An entry will be overwritten in the next month, e.g. an entry on the 4th May will overwrite an entry on the 4th April.
|
||||
On Bangle.js 1 only one day is logged due to low memory.
|
||||
The logs can be viewed with the download button:
|
||||
|
||||

|
||||
|
|
|
@ -146,8 +146,9 @@ function addLog(time, type) {
|
|||
var minAlarm = new Date();
|
||||
var measure = true;
|
||||
if (nextAlarmDate !== undefined) {
|
||||
config.logs[nextAlarmDate.getDate()] = []; // overwrite log on each day of month
|
||||
logs = config.logs[nextAlarmDate.getDate()];
|
||||
const logday = BANGLEJS2 ? nextAlarmDate.getDate() : 0;
|
||||
config.logs[logday] = []; // overwrite log on each day of month
|
||||
logs = config.logs[logday];
|
||||
g.clear();
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
|
Loading…
Reference in New Issue