forked from FOSS/BangleApps
commit
0a93e27570
17
apps.json
17
apps.json
|
@ -3316,5 +3316,22 @@
|
|||
{"name":"mysticclock.settings.js","url":"mystic-clock-settings.js"},
|
||||
{"name":"mysticclock.img","url":"mystic-clock-icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{ "id": "thermomF",
|
||||
"name": "Fahrenheit Thermometer",
|
||||
"shortName":"Thermometer F",
|
||||
"icon": "app.png",
|
||||
"version":"0.01",
|
||||
"description": "A modification of the Thermometer App to display temprature in Fahrenheit",
|
||||
"tags": "",
|
||||
"storage": [
|
||||
{"name":"thermof.app.js","url":"app.js"},
|
||||
{"name":"thermof.png","url":"app-icon.js","evaluate":true}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
require("heatshrink").decompress(atob("AH4A/AAMIxGIwAXTxACEACIsChAXqLwQDBMCQXYI4YvUCgIXVF6xH/I8DX/R/4ANgUgAIYX/C+MiC4ciFyQCGC54aEgAXQIIUiAYYXRgUzmYtBC6ASCC4IcCC5+wgGzC4M7gELC6O7C4O7C6ISC2c7DgQXRAQIDDC58LFYIFIGB4uSFQRFDFyJeDMAYA/AH4"))
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,28 @@
|
|||
function onTemperature(p) {
|
||||
g.reset(1).clearRect(0,24,g.getWidth(),g.getHeight());
|
||||
g.setFont("6x8",2).setFontAlign(0,0);
|
||||
var x = g.getWidth()/2;
|
||||
var y = g.getHeight()/2 + 10;
|
||||
g.drawString("Temperature", x, y - 45);
|
||||
g.setFontVector(70).setFontAlign(0,0);
|
||||
g.drawString(p.temperature.toFixed(1), x, y);
|
||||
}
|
||||
|
||||
function drawTemperature() {
|
||||
if (Bangle.getPressure) {
|
||||
Bangle.getPressure().then(onTemperature);
|
||||
} else {
|
||||
onTemperature({
|
||||
temperature : E.getTemperature() * (9/5) + 32,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setInterval(function() {
|
||||
drawTemperature();
|
||||
}, 20000);
|
||||
drawTemperature();
|
||||
E.showMessage("Loading...");
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
Loading…
Reference in New Issue