diff --git a/apps/astrocalc/ChangeLog b/apps/astrocalc/ChangeLog index ee9c7bbe4..df039ba0e 100644 --- a/apps/astrocalc/ChangeLog +++ b/apps/astrocalc/ChangeLog @@ -6,3 +6,4 @@ 0.06: Fix azimuth (bug #2651), only show degrees 0.07: Minor code improvements 0.08: Minor code improvements +0.09: Fix: Handle when the moon rise/set do not occur on the current day diff --git a/apps/astrocalc/astrocalc-app.js b/apps/astrocalc/astrocalc-app.js index cd1965290..283c5aab7 100644 --- a/apps/astrocalc/astrocalc-app.js +++ b/apps/astrocalc/astrocalc-app.js @@ -180,8 +180,8 @@ function drawMoonTimesPage(gps, title) { const moonColor = g.theme.dark ? {r: 1, g: 1, b: 1} : {r: 0, g: 0, b: 0}; const pageData = { - Rise: dateToTimeString(times.rise), - Set: dateToTimeString(times.set), + Rise: times.rise ? dateToTimeString(times.rise) : "Not today", + Set: times.set ? dateToTimeString(times.set) : "Not today", }; drawData(title, pageData, null, g.getHeight()/2 - Object.keys(pageData).length/2*20 + 5); @@ -240,7 +240,7 @@ function sunIndexPageMenu(gps) { "title": "-- Sun --", }, "Current Pos": () => { - m = E.showMenu(); + E.showMenu(); drawSunShowPage(gps, "Current Pos", new Date()); }, }; @@ -248,13 +248,13 @@ function sunIndexPageMenu(gps) { Object.keys(sunTimes).sort().reduce((menu, key) => { const title = titlizeKey(key); menu[title] = () => { - m = E.showMenu(); + E.showMenu(); drawSunShowPage(gps, key, sunTimes[key]); }; return menu; }, sunMenu); - sunMenu["< Back"] = () => m = indexPageMenu(gps); + sunMenu["< Back"] = () => indexPageMenu(gps); return E.showMenu(sunMenu); } @@ -266,18 +266,18 @@ function moonIndexPageMenu(gps) { "title": "-- Moon --", }, "Times": () => { - m = E.showMenu(); + E.showMenu(); drawMoonTimesPage(gps, /*LANG*/"Times"); }, "Position": () => { - m = E.showMenu(); + E.showMenu(); drawMoonPositionPage(gps, /*LANG*/"Position"); }, "Illumination": () => { - m = E.showMenu(); + E.showMenu(); drawMoonIlluminationPage(gps, /*LANG*/"Illumination"); }, - "< Back": () => m = indexPageMenu(gps), + "< Back": () => indexPageMenu(gps), }; return E.showMenu(moonMenu); @@ -289,10 +289,10 @@ function indexPageMenu(gps) { "title": /*LANG*/"Select", }, /*LANG*/"Sun": () => { - m = sunIndexPageMenu(gps); + sunIndexPageMenu(gps); }, /*LANG*/"Moon": () => { - m = moonIndexPageMenu(gps); + moonIndexPageMenu(gps); }, "< Back": () => { load(); } }; @@ -300,9 +300,9 @@ function indexPageMenu(gps) { return E.showMenu(menu); } -function getCenterStringX(str) { - return (g.getWidth() - g.stringWidth(str)) / 2; -} +//function getCenterStringX(str) { +// return (g.getWidth() - g.stringWidth(str)) / 2; +//} function init() { let location = require("Storage").readJSON("mylocation.json",1)||{"lat":51.5072,"lon":0.1276,"location":"London"}; @@ -311,5 +311,4 @@ function init() { Bangle.drawWidgets(); } -let m; init(); diff --git a/apps/astrocalc/metadata.json b/apps/astrocalc/metadata.json index a43534325..d88037d09 100644 --- a/apps/astrocalc/metadata.json +++ b/apps/astrocalc/metadata.json @@ -1,7 +1,7 @@ { "id": "astrocalc", "name": "Astrocalc", - "version": "0.08", + "version": "0.09", "description": "Calculates interesting information on the sun like sunset and sunrise and moon cycles for the current day based on your location from MyLocation app", "icon": "astrocalc.png", "tags": "app,sun,moon,cycles,tool,outdoors", diff --git a/apps/run/README.md b/apps/run/README.md index 7f645b518..452549856 100644 --- a/apps/run/README.md +++ b/apps/run/README.md @@ -6,6 +6,8 @@ shows distance, time, steps, cadence, pace and more. To use it, start the app and press the middle button so that the red `STOP` in the bottom right turns to a green `RUN`. +The separate **Run+** app for Bangle.js 2 provides additional features. + ## Display * `DIST` - the distance travelled based on the GPS (if you have a GPS lock). diff --git a/apps/run/metadata.json b/apps/run/metadata.json index 99296180d..126d8fcf0 100644 --- a/apps/run/metadata.json +++ b/apps/run/metadata.json @@ -1,7 +1,7 @@ { "id": "run", "name": "Run", "version": "0.19", - "description": "Displays distance, time, steps, cadence, pace and more for runners.", + "description": "Displays distance, time, steps, cadence, pace and more for runners. The **Run+** app for Bangle.js 2 provides additional features.", "icon": "app.png", "tags": "run,running,fitness,outdoors,gps", "supports" : ["BANGLEJS","BANGLEJS2"],