commit
178c16f08c
|
|
@ -5,3 +5,4 @@
|
||||||
Update every 10s, average last 5 readings
|
Update every 10s, average last 5 readings
|
||||||
Changes based on #1092
|
Changes based on #1092
|
||||||
0.06: Minor tweaks for stability. Update every 5 seconds
|
0.06: Minor tweaks for stability. Update every 5 seconds
|
||||||
|
0.07: Add back button
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ function onTemperature(p) {
|
||||||
// Gets the temperature in the most accurate way (pressure sensor or inbuilt thermistor)
|
// Gets the temperature in the most accurate way (pressure sensor or inbuilt thermistor)
|
||||||
function drawTemperature() {
|
function drawTemperature() {
|
||||||
if (Bangle.getPressure) {
|
if (Bangle.getPressure) {
|
||||||
Bangle.getPressure().then(p =>{if (p) onTemperature(p)});
|
Bangle.getPressure().then(p =>{if (p) onTemperature(p);});
|
||||||
} else {
|
} else {
|
||||||
onTemperature({
|
onTemperature({
|
||||||
temperature : E.getTemperature()
|
temperature : E.getTemperature()
|
||||||
|
|
@ -36,6 +36,9 @@ setInterval(function() {
|
||||||
drawTemperature();
|
drawTemperature();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.setUI({
|
||||||
|
mode : "custom",
|
||||||
|
back : function() {load();}
|
||||||
|
});
|
||||||
E.showMessage("Reading temperature...");
|
E.showMessage("Reading temperature...");
|
||||||
drawTemperature();
|
drawTemperature();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "thermom",
|
"id": "thermom",
|
||||||
"name": "Thermometer",
|
"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.",
|
"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",
|
"icon": "app.png",
|
||||||
"tags": "tool",
|
"tags": "tool",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue