fixed VSWR bar graph bug

This commit is contained in:
Michael Clemens // DK1MI 2023-05-29 20:46:58 +00:00
parent ad096c8513
commit 8d472ee687

View File

@ -187,7 +187,7 @@ function load_vu_meters() {
vumeter(swr_vu_meter, {
"boxCount": 10,
"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") {
swr_vu_meter.setAttribute('data-val', 0);
} else {
swr_vu_meter.setAttribute('data-val', strtoint(data[6]-1));
swr_vu_meter.setAttribute('data-val', strtoint((data[6]-1)*100));
}
} else {
document.getElementById("vswr_led_box").style.display = 'none';