Pastel: call process.memory(false), avoid triggering a GC event

pull/1407/head
hughbarney 2022-02-07 23:05:59 +00:00
parent 701fd4a790
commit 5f36271256
3 changed files with 4 additions and 2 deletions

View File

@ -11,3 +11,5 @@
0.11: Changed cycle on minute to prevInfo to avoid the 2nd one being the blank line
0.12: Removed dependancy on widpedom, now uses Bangle.getHealthStatus("day").steps
which requires 2.11.27 firmware to reset at midnight
0.13: call process.memory(false) to avoid triggering a GC of memory
supported in pre 2.12.13 firmware

View File

@ -2,7 +2,7 @@
"id": "pastel",
"name": "Pastel Clock",
"shortName": "Pastel",
"version": "0.12",
"version": "0.13",
"description": "A Configurable clock with custom fonts, background and weather display. Has a cyclic information line that includes, day, date, battery, sunrise and sunset times. Requires firmware 2.11.27",
"icon": "pastel.png",
"dependencies": {"mylocation":"app","weather":"app"},

View File

@ -83,7 +83,7 @@ const infoData = {
ID_SS: { calc: () => 'Sunset: ' + sunSet },
ID_STEP: { calc: () => 'Steps: ' + getSteps() },
ID_BATT: { calc: () => 'Battery: ' + E.getBattery() + '%' },
ID_MEM: { calc: () => {var val = process.memory(); return 'Ram: ' + Math.round(val.usage*100/val.total) + '%';} },
ID_MEM: { calc: () => {var val = process.memory(false); return 'Ram: ' + Math.round(val.usage*100/val.total) + '%';} },
ID_ID: { calc: () => {var val = NRF.getAddress().split(':'); return 'Id: ' + val[4] + val[5];} },
ID_FW: { calc: () => 'Fw: ' + process.env.VERSION }
};