diff --git a/apps/calclock/ChangeLog b/apps/calclock/ChangeLog index 90bcfb9d4..b157136a5 100644 --- a/apps/calclock/ChangeLog +++ b/apps/calclock/ChangeLog @@ -4,3 +4,4 @@ 0.04: Improve current time readability in light theme. 0.05: Show calendar colors & improved all day events. 0.06: Improved multi-line locations & titles +0.07: Buzz 30, 15 and 1 minute before an event diff --git a/apps/calclock/calclock.js b/apps/calclock/calclock.js index 1f98502ef..622b77612 100644 --- a/apps/calclock/calclock.js +++ b/apps/calclock/calclock.js @@ -117,6 +117,17 @@ function fullRedraw() { drawFutureEvents(y); } +function buzzForEvents() { + let nextEvent = next[0]; if (!nextEvent) return; + if (nextEvent.allDay) return; + let minToEvent = Math.round((nextEvent.timestamp - getTime()) / 60.0); + switch (minToEvent) { + case 30: require("buzz").pattern(","); break; + case 15: require("buzz").pattern(", ,"); break; + case 1: require("buzz").pattern(": : :"); break; + } +} + function redraw() { g.reset(); if (current.find(e=>!isActive(e)) || next.find(isActive)) { @@ -124,10 +135,12 @@ function redraw() { } else { drawCurrentEvents(30); } + buzzForEvents(); } g.clear(); fullRedraw(); +buzzForEvents(); var minuteInterval = setInterval(redraw, 60 * 1000); Bangle.setUI("clock"); diff --git a/apps/calclock/metadata.json b/apps/calclock/metadata.json index bfd847595..5cb47956b 100644 --- a/apps/calclock/metadata.json +++ b/apps/calclock/metadata.json @@ -2,7 +2,7 @@ "id": "calclock", "name": "Calendar Clock", "shortName": "CalClock", - "version": "0.06", + "version": "0.07", "description": "Show the current and upcoming events synchronized from Gadgetbridge", "icon": "calclock.png", "type": "clock", diff --git a/apps/fastreset/ChangeLog b/apps/fastreset/ChangeLog index d777d8c28..eec108328 100644 --- a/apps/fastreset/ChangeLog +++ b/apps/fastreset/ChangeLog @@ -1,2 +1,5 @@ 0.01: New App! 0.02: Shorten the timeout before executing to 250 ms. +0.03: Add inner timeout of 150 ms so user has more time to release the button + before clock ui is initialized and adds it's button watch for going to + launcher. diff --git a/apps/fastreset/boot.js b/apps/fastreset/boot.js index c099070e3..5d1fd50b1 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();}, 250); + if (e.state) buzzTimeout = setTimeout(()=>{Bangle.buzz(80,0.40);setTimeout(Bangle.showClock,150);}, 250); if (!e.state && buzzTimeout) clearTimeout(buzzTimeout);}, -BTN,{repeat:true, edge:'both' });} +BTN,{repeat:true,edge:'both'});} diff --git a/apps/fastreset/metadata.json b/apps/fastreset/metadata.json index 2d817a91f..455649b48 100644 --- a/apps/fastreset/metadata.json +++ b/apps/fastreset/metadata.json @@ -1,7 +1,7 @@ { "id": "fastreset", "name": "Fast Reset", "shortName":"Fast Reset", - "version":"0.02", + "version":"0.03", "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", diff --git a/apps/pebbled/ChangeLog b/apps/pebbled/ChangeLog index a0127ffce..9f5734152 100644 --- a/apps/pebbled/ChangeLog +++ b/apps/pebbled/ChangeLog @@ -3,3 +3,4 @@ 0.03: Swipe down to see widgets Support for fast loading 0.04: Localisation request: added Miles and AM/PM +0.05: Prevent exceptions from halting the draw cycle diff --git a/apps/pebbled/metadata.json b/apps/pebbled/metadata.json index 8924e600a..483f6e0d3 100644 --- a/apps/pebbled/metadata.json +++ b/apps/pebbled/metadata.json @@ -2,7 +2,7 @@ "id": "pebbled", "name": "Pebble Clock with distance", "shortName": "Pebble + distance", - "version": "0.04", + "version": "0.05", "description": "Fork of Pebble Clock with distance in KM. Both step count and the distance are on the main screen. Default step length = 0.75m (can be changed in settings).", "readme": "README.md", "icon": "pebbled.png", diff --git a/apps/pebbled/pebbled.app.js b/apps/pebbled/pebbled.app.js index 54b56712c..c90a8d2e7 100644 --- a/apps/pebbled/pebbled.app.js +++ b/apps/pebbled/pebbled.app.js @@ -37,6 +37,13 @@ const h3 = 7*h/8 - 10; let batteryWarning = false; let draw = function() { + // queue next draw + if (drawTimeout) clearTimeout(drawTimeout); + drawTimeout = setTimeout(function() { + drawTimeout = undefined; + draw(); + }, 60000 - (Date.now() % 60000)); + let date = new Date(); let da = date.toString().split(" "); let timeStr = settings.localization === "US" ? tConv24(da[4].substr(0,5)) : da[4].substr(0,5); @@ -101,13 +108,6 @@ let draw = function() { else g.setColor('#000'); // otherwise black regardless of theme g.drawString(distanceStr, w/2, ha + 107); - - // queue next draw - if (drawTimeout) clearTimeout(drawTimeout); - drawTimeout = setTimeout(function() { - drawTimeout = undefined; - draw(); - }, 60000 - (Date.now() % 60000)); }; // at x,y width:wi thicknes:th diff --git a/apps/sunrise/ChangeLog b/apps/sunrise/ChangeLog index 1f1c7e8df..58e3c9232 100644 --- a/apps/sunrise/ChangeLog +++ b/apps/sunrise/ChangeLog @@ -3,3 +3,4 @@ 0.03: Show day/month, add animations, fix !mylocation and text glitch 0.04: Always show the widgets, swifter animations and lighter sea line 0.05: Fixed hours increasing too early, added missing 23 o'clock, simplified code +0.06: Draw the screen exactly on the minute boundary diff --git a/apps/sunrise/app.js b/apps/sunrise/app.js index 4c52020bb..4d1f444a4 100644 --- a/apps/sunrise/app.js +++ b/apps/sunrise/app.js @@ -358,13 +358,18 @@ function initialAnimation () { initialAnimationFrame(); } +function renderAndQueue() { + setTimeout(renderAndQueue, 60000 - (Date.now() % 60000)); + renderScreen(); +} + function main () { sunRiseX = xfromTime(sunrise.getHours() + sunrise.getMinutes() / 60); sunSetX = xfromTime(sunset.getHours() + sunset.getMinutes() / 60); g.setBgColor(0, 0, 0); g.clear(); - setInterval(renderScreen, 60 * 1000); + renderAndQueue(); initialAnimation(); } diff --git a/apps/sunrise/metadata.json b/apps/sunrise/metadata.json index 8b263e16c..0490a8543 100644 --- a/apps/sunrise/metadata.json +++ b/apps/sunrise/metadata.json @@ -2,7 +2,7 @@ "id": "sunrise", "name": "Sunrise", "shortName": "Sunrise", - "version": "0.05", + "version": "0.06", "type": "clock", "description": "Show sunrise and sunset times", "icon": "app.png",