mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 01:48:19 +02:00
0.8.42
* add loss rate to `/visualization` in the statistics window * corrected `getLossRate` infos for MqTT and prometheus * added information about working IRQ for NRF24 and CMT2300A to `/system`
This commit is contained in:
parent
dd0bec6fc0
commit
0d10d19b30
12 changed files with 64 additions and 26 deletions
|
@ -44,12 +44,21 @@
|
|||
return ml("div", {class: "head p-2 mt-3"}, ml("div", {class: "row"}, ml("div", {class: "col a-c"}, text)))
|
||||
}
|
||||
|
||||
function irqBadge(state) {
|
||||
switch(state) {
|
||||
case 0: return badge(false, "unknown", "warning"); break;
|
||||
case 1: return badge(true, "true"); break;
|
||||
default: return badge(false, "false"); break;
|
||||
}
|
||||
}
|
||||
|
||||
function parseRadio(obj) {
|
||||
const dr = ["1 M", "2 M", "250 k"]
|
||||
|
||||
if(obj.radioNrf.en) {
|
||||
lines = [
|
||||
tr("NRF24L01", badge(obj.radioNrf.isconnected, ((obj.radioNrf.isconnected) ? "" : "not ") + "connected")),
|
||||
tr("Interrupt Pin working", irqBadge(obj.radioNrf.irqOk)),
|
||||
tr("NRF24 Data Rate", dr[obj.radioNrf.dataRate] + "bps"),
|
||||
tr("DTU Radio ID", obj.radioNrf.sn)
|
||||
];
|
||||
|
@ -67,6 +76,7 @@
|
|||
if(obj.radioCmt.en) {
|
||||
cmt = [
|
||||
tr("CMT2300A", badge(obj.radioCmt.isconnected, ((obj.radioCmt.isconnected) ? "" : "not ") + "connected")),
|
||||
tr("Interrupt Pin working", irqBadge(obj.radioCmt.irqOk)),
|
||||
tr("DTU Radio ID", obj.radioCmt.sn)
|
||||
];
|
||||
} else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue