[feat](trx-frontend-http): draw virtual channel markers on spectrum + OOB error

- Draw sky-blue dashed/solid lines on spectrum overlay for each vchan
- Active virtual channel gets a solid line; inactive ones are dashed
- Validate freq against SDR capture window in vchanSetChannelFreq and
  show a showHint error when tuning out of bandwidth

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-11 07:27:51 +01:00
parent af45c32222
commit 4bb7248257
2 changed files with 37 additions and 0 deletions
@@ -962,6 +962,28 @@ function drawSignalOverlay() {
}
}
// Virtual channel markers (sky-blue dashed lines, active one is solid).
if (typeof vchanChannels !== "undefined" && Array.isArray(vchanChannels)) {
vchanChannels.forEach(ch => {
if (!Number.isFinite(ch.freq_hz) || ch.freq_hz <= 0) return;
const xc = hzToX(ch.freq_hz);
if (xc < 0 || xc > W) return;
const isActive = ch.id === vchanActiveId;
const color = cssColorToRgba("#38bdf8");
if (isActive) {
signalOverlayGl.drawSegments([xc, 0, xc, H], color, Math.max(1.5, dpr * 1.5));
} else {
signalOverlayGl.drawDashedVerticalLine(
xc, 0, H,
Math.max(2, Math.round(4 * dpr)),
Math.max(3, Math.round(6 * dpr)),
color,
Math.max(1, dpr),
);
}
});
}
if (lastFreqHz != null) {
const xf = hzToX(lastFreqHz);
if (xf >= 0 && xf <= W) {