Web: normalize unit formatting across all HUD cards

Apply consistent number-unit spacing and helper usage:

- Add a space before "%" in all percentage labels (Battery,
  Signal Quality, TX Share, RX/TX Flood Share, RX Error Rate,
  Archive Free), matching the existing style of other units
  such as " dBm" and " dB".

- Replace raw String(x) + " s" with formatDuration() for RX Air,
  TX Air, and Total Air in the Radio card, matching the style
  already used for uptime and event age.
This commit is contained in:
Valentin V. Bartenev
2026-05-10 00:09:08 +03:00
parent 86bf8dcb5c
commit 5bf017be1b
+3 -3
View File
@@ -1540,9 +1540,9 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
${renderMeter("SNR", Number.isFinite(radio.last_snr) ? radio.last_snr.toFixed(1) + " dB" : "--", snrPct, "link quality", snrTone)} ${renderMeter("SNR", Number.isFinite(radio.last_snr) ? radio.last_snr.toFixed(1) + " dB" : "--", snrPct, "link quality", snrTone)}
${renderMeter("Noise Floor", (radio.noise_floor ?? "--") + " dBm", noisePct, "ambient RF", noiseTone)} ${renderMeter("Noise Floor", (radio.noise_floor ?? "--") + " dBm", noisePct, "ambient RF", noiseTone)}
<div class="metric-grid"> <div class="metric-grid">
${renderMetric("RX Air", String(radio.rx_air_secs ?? 0) + " s")} ${renderMetric("RX Air", formatDuration(radio.rx_air_secs || 0))}
${renderMetric("TX Air", String(radio.tx_air_secs ?? 0) + " s")} ${renderMetric("TX Air", formatDuration(radio.tx_air_secs || 0))}
${renderMetric("Total Air", String(totalAir) + " s")} ${renderMetric("Total Air", formatDuration(totalAir))}
${renderMetric("TX Share", Math.round(txShare) + " %")} ${renderMetric("TX Share", Math.round(txShare) + " %")}
</div> </div>
</section>`; </section>`;