Add back button

pull/2093/head
thyttan 2022-08-20 00:14:14 +02:00
parent fb7b69379a
commit fe16d67e99
3 changed files with 7 additions and 3 deletions

View File

@ -5,3 +5,4 @@
Update every 10s, average last 5 readings
Changes based on #1092
0.06: Minor tweaks for stability. Update every 5 seconds
0.07: Add back button

View File

@ -24,7 +24,7 @@ function onTemperature(p) {
// Gets the temperature in the most accurate way (pressure sensor or inbuilt thermistor)
function drawTemperature() {
if (Bangle.getPressure) {
Bangle.getPressure().then(p =>{if (p) onTemperature(p)});
Bangle.getPressure().then(p =>{if (p) onTemperature(p);});
} else {
onTemperature({
temperature : E.getTemperature()
@ -36,6 +36,9 @@ setInterval(function() {
drawTemperature();
}, 5000);
Bangle.loadWidgets();
Bangle.drawWidgets();
Bangle.setUI({
mode : "custom",
back : function() {load();}
});
E.showMessage("Reading temperature...");
drawTemperature();

View File

@ -1,7 +1,7 @@
{
"id": "thermom",
"name": "Thermometer",
"version": "0.06",
"version": "0.07",
"description": "Displays the current temperature in degree Celsius/Fahrenheit (depending on locale), updates every 10 seconds with average of last 5 readings.",
"icon": "app.png",
"tags": "tool",