forked from FOSS/BangleApps
Stability improvement for alt.
parent
a746510f0b
commit
ebb35f75aa
|
@ -165,8 +165,12 @@ function printData(key, y, c){
|
||||||
should_print= false;
|
should_print= false;
|
||||||
text = "ALT";
|
text = "ALT";
|
||||||
Bangle.getPressure().then(function(data){
|
Bangle.getPressure().then(function(data){
|
||||||
|
if(data && data.altitude){
|
||||||
value = data.altitude.toFixed(0);
|
value = data.altitude.toFixed(0);
|
||||||
printRow(text, value, y, c);
|
printRow(text, value, y, c);
|
||||||
|
} else {
|
||||||
|
printRow(text, "-", y, c);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
} else if(key == "CORET"){
|
} else if(key == "CORET"){
|
||||||
|
|
Loading…
Reference in New Issue