From c31d94b644990b376d39d6e345b0fce2474af4ee Mon Sep 17 00:00:00 2001 From: Jordi Mas Date: Sat, 16 Mar 2024 17:12:43 +0100 Subject: [PATCH] Use Bangle's temperature instead of non-working service --- apps/advcasio/ChangeLog | 3 ++- apps/advcasio/README.md | 13 ++----------- apps/advcasio/app.js | 6 +++--- apps/advcasio/metadata.json | 4 ++-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/apps/advcasio/ChangeLog b/apps/advcasio/ChangeLog index bc4850635..0bca28a1c 100644 --- a/apps/advcasio/ChangeLog +++ b/apps/advcasio/ChangeLog @@ -2,4 +2,5 @@ 0.02: Remove un-needed fonts to improve memory usage 0.03: Tell clock widgets to hide. 0.04: Swipe down to see widgets, step counter now just uses getHealthStatus -0.05: Report latest HRM rather than HRM 10 minutes ago (fix #2395) \ No newline at end of file +0.05: Report latest HRM rather than HRM 10 minutes ago (fix #2395) +0.06: Use watch temperature \ No newline at end of file diff --git a/apps/advcasio/README.md b/apps/advcasio/README.md index 3ce771497..bce3f71d7 100644 --- a/apps/advcasio/README.md +++ b/apps/advcasio/README.md @@ -3,8 +3,7 @@ An over-engineered clock inspired by Casio watches.
-It has a dedicated timer, a scratchpad and can display the weather condition 4 days ahead.
-It uses a custom web app to update its content.
+It has a dedicated timer, a scratchpad and displays the current temperature.
Forked from the awesome Cassio Watch.
## Todo @@ -21,7 +20,7 @@ Forked from the awesome Cassio Watch.
- Footsteps - Battery - Simple Timer embedded -- Weather forecast (7 days) +- Current temperature - Scratchpad ## Screenshots @@ -36,14 +35,6 @@ Web interface to update weather & scratchpad
## Usage -### How to update the tasks list / weather -- you will need a free openweathermap.org api key. -- go to https://dotgreg.github.io/advCasioBangleClock/ - - Alternatively you can install it on your own server/heroku/service/github pages, the web-app code is here -- fill the location and the api key (it will be saved on your browser, no need to do it each time) -- edit the scratchpad with what you want -- click on sync -- reload your clock! ### How to start/stop the timer - swipe up : add time (+5min) diff --git a/apps/advcasio/app.js b/apps/advcasio/app.js index d951da4cc..796fac2a7 100644 --- a/apps/advcasio/app.js +++ b/apps/advcasio/app.js @@ -88,9 +88,9 @@ function drawRocket() { function getTemperature(){ try { - var weatherJson = storage.readJSON('weather.json'); - var weather = weatherJson.weather; - return Math.round(weather.temp-273.15); + var temperature = E.getTemperature() + var formatted = require("locale").temp(temperature).replace(/[^\d-]/g, ''); + return formatted; } catch(ex) { print(ex) diff --git a/apps/advcasio/metadata.json b/apps/advcasio/metadata.json index 32f5de7d3..1bc5854e2 100644 --- a/apps/advcasio/metadata.json +++ b/apps/advcasio/metadata.json @@ -1,8 +1,8 @@ { "id": "advcasio", "name": "Advanced Casio Clock", "shortName":"advcasio", - "version":"0.05", - "description": "An over-engineered clock inspired by Casio watches. It has a 4 days weather, a timer using swipe and a scratchpad. Can be updated using a dedicated webapp.", + "version":"0.06", + "description": "An over-engineered clock inspired by Casio watches. It has current temperature, a timer using swipe and a scratchpad. Can be updated using a dedicated webapp.", "icon": "app.png", "tags": "clock", "type": "clock",