[sleeplog] Reduced log size further, see #1835

Reduced log size further to 750 entries
pull/1840/head
storm64 2022-05-17 17:51:10 +02:00
parent 92ac8ee3f0
commit 8102fd4e72
4 changed files with 4 additions and 3 deletions

View File

@ -3,3 +3,4 @@
0.03: Added power saving mode, move all read/write log actions into lib/module
0.04: Fix #1445, display loading info, add icons to display service states
0.05: Fix LOW_MEMORY,MEMORY error on to big log size
0.06: Reduced log size further to 750 entries

View File

@ -22,7 +22,7 @@ also provides a power saving mode using the built in movement calculation. The i
To minimize the log size only a changed state is logged. The logged timestamp is matching the beginning of its measurement period.
When not on power saving mode a movement is detected nearly instantaneous and the detection of a no movement period is delayed by the minimal no movement duration. To match the beginning of the measurement period a cached timestamp (_sleeplog.firstnomodate_) is logged.
On power saving mode the measurement period is fixed to 10 minutes and all logged timestamps are also set back 10 minutes.
To prevent a LOW_MEMORY,MEMORY error the log size is limited to 1500 entries, older entries will be overwritten.
To prevent a LOW_MEMORY,MEMORY error the log size is limited to 750 entries, older entries will be overwritten.
---
### Control

View File

@ -99,7 +99,7 @@ exports = {
}
// check and if neccessary reduce logsize to prevent low mem
if (input.length > 1500) input = input.slice(-1500);
if (input.length > 750) input = input.slice(-750);
// simple check for log plausibility
if (input[0].length > 1 && input[0][0] * 1 > 9E11) {

View File

@ -2,7 +2,7 @@
"id":"sleeplog",
"name":"Sleep Log",
"shortName": "SleepLog",
"version": "0.05",
"version": "0.06",
"description": "Log and view your sleeping habits. This app derived from SleepPhaseAlarm and uses also the principe of Estimation of Stationary Sleep-segments (ESS). It also provides a power saving mode using the built in movement calculation.",
"icon": "app.png",
"type": "app",