Merge branch 'master' of github.com:espruino/BangleApps

master
Gordon Williams 2021-11-29 10:09:47 +00:00
commit 72d3c44ffd
3 changed files with 7 additions and 6 deletions

View File

@ -3893,8 +3893,8 @@
{
"id": "thermom",
"name": "Thermometer",
"version": "0.02",
"description": "Displays the current temperature, updated every 20 seconds",
"version": "0.03",
"description": "Displays the current temperature in degree Celsius, updated every 20 seconds",
"icon": "app.png",
"tags": "tool",
"supports": ["BANGLEJS"],

View File

@ -1 +1,2 @@
0.02: New App!
0.03: Improved messages and added Celsius sign

View File

@ -3,9 +3,9 @@ function onTemperature(p) {
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.drawString("Temperature:", x, y - 45);
g.setFontVector(70).setFontAlign(0,0);
g.drawString(p.temperature.toFixed(1), x, y);
g.drawString(p.temperature.toFixed(1) + " °C", x, y);
}
function drawTemperature() {
@ -23,6 +23,6 @@ setInterval(function() {
drawTemperature();
}, 20000);
drawTemperature();
E.showMessage("Loading...");
E.showMessage("Reading temperature...");
Bangle.loadWidgets();
Bangle.drawWidgets();