[fix](trx-frontend): increase spectrum headroom and match heights

Add 10 dB of spectrum headroom and keep the overview waterfall the same height as the spectrum plot.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-01 10:14:22 +01:00
parent 626d5e2ec5
commit 740d678357
2 changed files with 7 additions and 5 deletions
@@ -3118,7 +3118,8 @@ let spectrumPanFrac = 0.5;
// Y-axis level: floor = bottom dB value shown; range = total dB span.
let spectrumFloor = -115;
let spectrumRange = 80;
let spectrumRange = 90;
const SPECTRUM_HEADROOM_DB = 20;
const SPECTRUM_SMOOTH_ALPHA = 0.42;
// BW-strip drag state.
@@ -4073,7 +4074,7 @@ if (spectrumCanvas) {
const noise = sorted[Math.floor(sorted.length * 0.15)];
const peak = sorted[sorted.length - 1];
spectrumFloor = Math.floor(noise / 10) * 10 - 10;
spectrumRange = Math.max(60, Math.ceil((peak - spectrumFloor) / 10) * 10 + 10);
spectrumRange = Math.max(60, Math.ceil((peak - spectrumFloor) / 10) * 10 + SPECTRUM_HEADROOM_DB);
if (floorInput) floorInput.value = spectrumFloor;
scheduleSpectrumDraw();
});
@@ -26,6 +26,7 @@
--filter-border: #385577;
--wavelength-fg: #8da3be;
--spectrum-bg: #0a0f18;
--spectrum-plot-height: 160px;
--jog-wheel-size: 83.2px;
--header-waterfall-overlap: 0rem;
}
@@ -488,7 +489,7 @@ small { color: var(--text-muted); }
#rds-ps-overlay {
display: none;
position: absolute;
top: calc(var(--header-waterfall-overlap) + 0.7rem);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 5;
@@ -609,7 +610,7 @@ small { color: var(--text-muted); }
}
#overview-canvas {
width: 100%;
height: calc(clamp(4.2rem, 11vh, 6.25rem) + var(--header-waterfall-overlap));
height: var(--spectrum-plot-height);
display: block;
}
.header-left {
@@ -986,7 +987,7 @@ button:focus-visible, input:focus-visible, select:focus-visible {
#spectrum-canvas {
display: block;
width: 100%;
height: 160px;
height: var(--spectrum-plot-height);
background: var(--spectrum-bg);
border-radius: 6px 6px 0 0;
cursor: crosshair;