Update app.js

Improving messages and added Celsius sign
pull/962/head
Marco H 2021-11-29 10:23:54 +01:00 committed by GitHub
parent 30e421e225
commit 765a683c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

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();
Bangle.drawWidgets();