mirror of
https://codeberg.org/mclemens/wt32powermeter.git
synced 2024-12-22 18:16:58 -05:00
fixed VSWR bar graph bug
This commit is contained in:
parent
ad096c8513
commit
8d472ee687
4
index.h
4
index.h
@ -187,7 +187,7 @@ function load_vu_meters() {
|
|||||||
vumeter(swr_vu_meter, {
|
vumeter(swr_vu_meter, {
|
||||||
"boxCount": 10,
|
"boxCount": 10,
|
||||||
"boxGapFraction": 0.25,
|
"boxGapFraction": 0.25,
|
||||||
"max": 2,
|
"max": strtoint((data[14]-1)*100),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ function getDATA() {
|
|||||||
if (data[6] == "-1" || data[6] == "inf" || data[15] == "1" || data[16] == "1") {
|
if (data[6] == "-1" || data[6] == "inf" || data[15] == "1" || data[16] == "1") {
|
||||||
swr_vu_meter.setAttribute('data-val', 0);
|
swr_vu_meter.setAttribute('data-val', 0);
|
||||||
} else {
|
} else {
|
||||||
swr_vu_meter.setAttribute('data-val', strtoint(data[6]-1));
|
swr_vu_meter.setAttribute('data-val', strtoint((data[6]-1)*100));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("vswr_led_box").style.display = 'none';
|
document.getElementById("vswr_led_box").style.display = 'none';
|
||||||
|
Loading…
Reference in New Issue
Block a user