mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-20 09:13:06 +01:00
add formatter for ROT
This commit is contained in:
@@ -540,6 +540,15 @@ let valueFormatters = {
|
|||||||
},
|
},
|
||||||
u: ''
|
u: ''
|
||||||
},
|
},
|
||||||
|
formatRot:{
|
||||||
|
f: function(v){
|
||||||
|
let x=parseFloat(v);
|
||||||
|
if (isNaN(x)) return '---';
|
||||||
|
x = x * 180.0 / Math.PI;
|
||||||
|
return x.toFixed(2);
|
||||||
|
},
|
||||||
|
u:'°/s'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function createDashboardItem(name, def, parent) {
|
function createDashboardItem(name, def, parent) {
|
||||||
let frame = addEl('div', 'dash', parent);
|
let frame = addEl('div', 'dash', parent);
|
||||||
|
|||||||
Reference in New Issue
Block a user