From f6f40b70177fc02224e2c6245d4f97ac774c3564 Mon Sep 17 00:00:00 2001 From: Alex Meyer Date: Tue, 5 Sep 2023 22:51:12 -0400 Subject: [PATCH 1/5] add repeatCalls option --- apps/messages/ChangeLog | 1 + apps/messages/lib.js | 4 +++- apps/messages/metadata.json | 2 +- apps/messages/settings.js | 7 +++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/messages/ChangeLog b/apps/messages/ChangeLog index 416363c45..5f4a81d1f 100644 --- a/apps/messages/ChangeLog +++ b/apps/messages/ChangeLog @@ -4,3 +4,4 @@ 0.58: show/hide "messages" widget directly, instead of through library stub 0.59: fixes message timeout by using setinterval, as it was intended. So the buzz is triggered every x seconds until the timeout occours. 0.60: Bump version to allow new buzz.js module to be loaded - fixes memory/performance hog when buzz called +0.61: Add repeatCalls option to allow different repeat settings for messages vs calls diff --git a/apps/messages/lib.js b/apps/messages/lib.js index f3ae253e6..59a0feea5 100644 --- a/apps/messages/lib.js +++ b/apps/messages/lib.js @@ -204,16 +204,18 @@ exports.buzz = function(msgSrc) { if ((require("Storage").readJSON("setting.json", 1) || {}).quiet) return Promise.resolve(); // never buzz during Quiet Mode const msgSettings = require("Storage").readJSON("messages.settings.json", true) || {}; let pattern; + let repeat; if (msgSrc && msgSrc.toLowerCase()==="phone") { // special vibration pattern for incoming calls pattern = msgSettings.vibrateCalls; + repeat = msgSettings.repeatCalls; } else { pattern = msgSettings.vibrate; + repeat = msgSettings.repeat; } if (pattern===undefined) { pattern = ":"; } // pattern may be "", so we can't use || ":" here if (!pattern) return Promise.resolve(); - let repeat = msgSettings.repeat; if (repeat===undefined) repeat = 4; // repeat may be zero if (repeat) { diff --git a/apps/messages/metadata.json b/apps/messages/metadata.json index e8aacd976..0ae661fd2 100644 --- a/apps/messages/metadata.json +++ b/apps/messages/metadata.json @@ -1,7 +1,7 @@ { "id": "messages", "name": "Messages", - "version": "0.60", + "version": "0.61", "description": "Library to handle, load and store message events received from Android/iOS", "icon": "app.png", "type": "module", diff --git a/apps/messages/settings.js b/apps/messages/settings.js index 09c9db455..c54c6b24e 100644 --- a/apps/messages/settings.js +++ b/apps/messages/settings.js @@ -6,6 +6,7 @@ if (settings.vibrate===undefined) settings.vibrate=":"; if (settings.vibrateCalls===undefined) settings.vibrateCalls=":"; if (settings.repeat===undefined) settings.repeat=4; + if (settings.repeatCalls===undefined) settings.repeatCalls=4; if (settings.vibrateTimeout===undefined) settings.vibrateTimeout=60; if (settings.unreadTimeout===undefined) settings.unreadTimeout=60; if (settings.maxMessages===undefined) settings.maxMessages=3; @@ -33,6 +34,12 @@ format: v => v?v+"s":/*LANG*/"Off", onchange: v => updateSetting("repeat", v) }, + /*LANG*/'Repeat for calls': { + value: settings().repeatCalls, + min: 0, max: 10, + format: v => v?v+"s":/*LANG*/"Off", + onchange: v => updateSetting("repeatCalls", v) + }, /*LANG*/'Vibrate timer': { value: settings().vibrateTimeout, min: 0, max: settings().maxUnreadTimeout, step : 10, From a7adfe74a6bbaa7094399030e2d361583a8b8d1d Mon Sep 17 00:00:00 2001 From: Alex Meyer Date: Tue, 5 Sep 2023 23:08:42 -0400 Subject: [PATCH 2/5] default to existing repeat value --- apps/messages/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/messages/settings.js b/apps/messages/settings.js index c54c6b24e..fa9fbe4f2 100644 --- a/apps/messages/settings.js +++ b/apps/messages/settings.js @@ -6,7 +6,7 @@ if (settings.vibrate===undefined) settings.vibrate=":"; if (settings.vibrateCalls===undefined) settings.vibrateCalls=":"; if (settings.repeat===undefined) settings.repeat=4; - if (settings.repeatCalls===undefined) settings.repeatCalls=4; + if (settings.repeatCalls===undefined) settings.repeatCalls=settings.repeat; if (settings.vibrateTimeout===undefined) settings.vibrateTimeout=60; if (settings.unreadTimeout===undefined) settings.unreadTimeout=60; if (settings.maxMessages===undefined) settings.maxMessages=3; From 606057310a8dde3ef33927b9d095af8dda2764d6 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Wed, 6 Sep 2023 14:17:00 +0200 Subject: [PATCH 3/5] fastreset: shorten the timeout to execution --- apps/fastreset/ChangeLog | 1 + apps/fastreset/README.md | 6 +++--- apps/fastreset/boot.js | 4 ++-- apps/fastreset/metadata.json | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/fastreset/ChangeLog b/apps/fastreset/ChangeLog index 5560f00bc..d777d8c28 100644 --- a/apps/fastreset/ChangeLog +++ b/apps/fastreset/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Shorten the timeout before executing to 250 ms. diff --git a/apps/fastreset/README.md b/apps/fastreset/README.md index 381d80cf5..44b855454 100644 --- a/apps/fastreset/README.md +++ b/apps/fastreset/README.md @@ -1,6 +1,6 @@ # Fast Reset -Reset the watch by holding the hardware button for half a second. If 'Fastload Utils' is installed this will typically be done with fastloading. A buzz acts as indicator. +Reset the watch by pressing the hardware button just a little bit longer than a click. If 'Fastload Utils' is installed this will typically be done with fastloading. A buzz acts as indicator. Fast Reset was developed with the app history feature of 'Fastload Utils' in mind. If many apps are in the history stack, the user may want a fast way to exit directly to the clock face without using the firmwares reset function. @@ -12,11 +12,11 @@ Just install and it will run as boot code. If 'Fastload Utils' is installed fastloading will be used when possible. Otherwise a standard `load(.bootcde)` is used. -If the hardware button is held for longer the standard reset functionality of the firmware is executed as well (total 1.5 seconds). And eventually the watchdog will be kicked. +If the hardware button is held for longer the standard reset functionality of the firmware is executed as well. And eventually the watchdog will be kicked. ## Controls -Hold the hardware button for half a second to feel the buzz, loading the clock face. +Press the hardware button just a little longer than a click to feel the buzz, loading the clock face. ## Requests diff --git a/apps/fastreset/boot.js b/apps/fastreset/boot.js index 681a5ddb7..c099070e3 100644 --- a/apps/fastreset/boot.js +++ b/apps/fastreset/boot.js @@ -1,5 +1,5 @@ {let buzzTimeout; -setWatch((e)=>{ - if (e.state) buzzTimeout = setTimeout(()=>{Bangle.buzz(80,0.40);Bangle.showClock();}, 500); +setWatch((e)=>{ + if (e.state) buzzTimeout = setTimeout(()=>{Bangle.buzz(80,0.40);Bangle.showClock();}, 250); if (!e.state && buzzTimeout) clearTimeout(buzzTimeout);}, BTN,{repeat:true, edge:'both' });} diff --git a/apps/fastreset/metadata.json b/apps/fastreset/metadata.json index 098e0eeb1..2d817a91f 100644 --- a/apps/fastreset/metadata.json +++ b/apps/fastreset/metadata.json @@ -1,12 +1,12 @@ { "id": "fastreset", "name": "Fast Reset", "shortName":"Fast Reset", - "version":"0.01", - "description": "Reset the watch by holding the hardware button for half a second. If 'Fastload Utils' is installed this will typically be done with fastloading. A buzz acts as indicator.", + "version":"0.02", + "description": "Reset the watch by pressing the hardware button just a little bit longer than a click. If 'Fastload Utils' is installed this will typically be done with fastloading. A buzz acts as indicator.", "icon": "app.png", "type": "bootloader", "tags": "system", - "supports" : ["BANGLEJS2"], + "supports" : ["BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"fastreset.boot.js","url":"boot.js"} From 9f2fe22838ba84d3863869d4f6780fed06b2f3cc Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 7 Sep 2023 10:27:19 +0100 Subject: [PATCH 4/5] fix #2996 with new 'core' --- core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core b/core index 431a3fb74..37a22e0c4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 431a3fb743da5c370729ab748cb2c177e70a345b +Subproject commit 37a22e0c49666ec3947ad0daaf5f5675101ca485 From 0bb063f19d68f9a72c544632367143f93f020f78 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 7 Sep 2023 10:49:03 +0100 Subject: [PATCH 5/5] recommend GPS --- apps/assistedgps/custom.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assistedgps/custom.html b/apps/assistedgps/custom.html index 30cdb3eed..994f6d053 100644 --- a/apps/assistedgps/custom.html +++ b/apps/assistedgps/custom.html @@ -31,7 +31,7 @@