1
0
Fork 0

Create widalt.settings.js

master
xxDUxx 2022-08-02 13:46:41 +02:00 committed by GitHub
parent 4587b98ee6
commit 974b1238da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
(function(back) {
o=Bangle.getOptions();
Bangle.getPressure().then((p)=>{
E.showMenu({
"" : { "title" : "Altimeter Widget" },
"< Back" : () => back(),
'QNH: ': {
value: 1013 | o.seaLevelPressure, // 0| converts undefined to 0
min: 100, max: 10000,
format: v=>(v+"hPa\nAlt: "+(44330 * (1.0 - Math.pow(p.pressure/v, 0.1903))).toFixed(0)+"m"),
onchange: v => {
o.seaLevelPressure = v;
Bangle.setOptions(o);
}
}
});
});
})