Merge pull request #1300 from hughbarney/master

Widpb: correct onStep()
master
Gordon Williams 2022-01-17 09:27:42 +00:00 committed by GitHub
commit 71c8b05f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 6 deletions

View File

@ -942,13 +942,13 @@
{ {
"id": "widlock", "id": "widlock",
"name": "Lock Widget", "name": "Lock Widget",
"version": "0.04", "version": "0.05",
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked", "description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked",
"icon": "widget.png", "icon": "widget.png",
"type": "widget", "type": "widget",
"tags": "widget,lock", "tags": "widget,lock",
"supports": ["BANGLEJS","BANGLEJS2"], "supports": ["BANGLEJS","BANGLEJS2"],
"sortorder": -1, "sortorder": -10,
"storage": [ "storage": [
{"name":"widlock.wid.js","url":"widget.js"} {"name":"widlock.wid.js","url":"widget.js"}
] ]
@ -4847,12 +4847,13 @@
"shortName":"Battery Theme", "shortName":"Battery Theme",
"icon": "widbata.png", "icon": "widbata.png",
"screenshots": [{"url":"screenshot_widbata_1.png"}], "screenshots": [{"url":"screenshot_widbata_1.png"}],
"version":"0.01", "version":"0.02",
"type": "widget", "type": "widget",
"supports": ["BANGLEJS", "BANGLEJS2"], "supports": ["BANGLEJS", "BANGLEJS2"],
"readme": "README.md", "readme": "README.md",
"description": "Shows the current battery level status in the top right using the clocks colour theme", "description": "Shows the current battery level status in the top right using the clocks colour theme",
"tags": "widget,battery", "tags": "widget,battery",
"sortorder": -10,
"storage": [ "storage": [
{"name":"widbata.wid.js","url":"widbata.wid.js"} {"name":"widbata.wid.js","url":"widbata.wid.js"}
] ]
@ -5619,12 +5620,13 @@
"shortName":"Simple Pedometer", "shortName":"Simple Pedometer",
"icon": "screenshot_widpa.png", "icon": "screenshot_widpa.png",
"screenshots": [{"url":"screenshot_widpa.png"}], "screenshots": [{"url":"screenshot_widpa.png"}],
"version":"0.02", "version":"0.03",
"type": "widget", "type": "widget",
"supports": ["BANGLEJS", "BANGLEJS2"], "supports": ["BANGLEJS", "BANGLEJS2"],
"readme": "README.md", "readme": "README.md",
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in 12x16 font, requires firmware v2.11.21 or later", "description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in 12x16 font, requires firmware v2.11.21 or later",
"tags": "widget,battery", "tags": "widget,battery",
"sortorder": -1,
"storage": [ "storage": [
{"name":"widpa.wid.js","url":"widpa.wid.js"} {"name":"widpa.wid.js","url":"widpa.wid.js"}
] ]
@ -5635,12 +5637,13 @@
"shortName":"Lato Pedometer", "shortName":"Lato Pedometer",
"icon": "screenshot_widpb.png", "icon": "screenshot_widpb.png",
"screenshots": [{"url":"screenshot_widpb.png"}], "screenshots": [{"url":"screenshot_widpb.png"}],
"version":"0.02", "version":"0.04",
"type": "widget", "type": "widget",
"supports": ["BANGLEJS", "BANGLEJS2"], "supports": ["BANGLEJS", "BANGLEJS2"],
"readme": "README.md", "readme": "README.md",
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in the Lato font, requires firmware v2.11.21 or later", "description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in the Lato font, requires firmware v2.11.21 or later",
"tags": "widget,battery", "tags": "widget,battery",
"sortorder": -1,
"storage": [ "storage": [
{"name":"widpb.wid.js","url":"widpb.wid.js"} {"name":"widpb.wid.js","url":"widpb.wid.js"}
] ]

View File

@ -1 +1,2 @@
0.01: Created 0.01: Created
0.02: Set sort order to -10 so always display in right hand corner

View File

@ -2,3 +2,4 @@
0.02: Handle new firmwares with 'lock' event 0.02: Handle new firmwares with 'lock' event
0.03: Don't try to be fancy - just bail out on firmwares without a lock event 0.03: Don't try to be fancy - just bail out on firmwares without a lock event
0.04: Set sortorder to -1 so that widget always takes up the furthest left position 0.04: Set sortorder to -1 so that widget always takes up the furthest left position
0.05: Set sortorder to -10 so that others can take -1 etc

View File

@ -1,2 +1,3 @@
0.01: First release 0.01: First release
0.02: Size widget after step count is reset 0.02: Size widget after step count is reset
0.03: set sortorder to -1

View File

@ -1,2 +1,4 @@
0.01: First release 0.01: First release
0.02: Fixed widget id to wibpb, Size widget after step count is reset 0.02: Fixed widget id to wibpb, Size widget after step count is reset
0.03: Fixed widget id in onStep() come on get it right!
0.04: set sortorder to -1

View File

@ -1,5 +1,5 @@
// on.step version // on.step version
Bangle.on('step', function(s) { WIDGETS["bata"].draw(); }); Bangle.on('step', function(s) { WIDGETS["widpb"].draw(); });
Bangle.on('lcdPower', function(on) { Bangle.on('lcdPower', function(on) {
if (on) WIDGETS["widpb"].draw(); if (on) WIDGETS["widpb"].draw();
}); });