Skip to content

Commit

Permalink
Merge pull request #1407 from hughbarney/master
Browse files Browse the repository at this point in the history
Pastel: call process.memory(false), avoid triggering a GC event
  • Loading branch information
gfwilliams authored Feb 8, 2022
2 parents 610a755 + 5f36271 commit 8983e69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions apps/pastel/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion apps/pastel/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion apps/pastel/pastel.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
};
Expand Down

0 comments on commit 8983e69

Please sign in to comment.