Fix scaled LQ/NLQ values for neighbors (#1420)

This commit is contained in:
Tim Wilkinson 2024-08-28 17:57:32 -07:00 committed by GitHub
parent 93f20037f7
commit 5dde2a97ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -138,8 +138,8 @@
const status = calcColor(tracker);
print(`<div class="ctrl cols status ${status}" hx-get="status/e/neighbor-device?m=${tracker.mac}">`);
const link = links[tracker.ip] || {};
const lq = link.lossMultiplier ? (int(100 * link.linkQuality * 65536 / link.lossMultiplier) + "%"): "-";
const nlq = link.lossMultiplier ? (int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier) + "%") : "-";
const lq = link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
const nlq = link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
let icon = "";
let title = "";
switch (tracker.type) {