diff --git a/frontend/src/components/FlexPanel.tsx b/frontend/src/components/FlexPanel.tsx index 38420b4..c4ade41 100644 --- a/frontend/src/components/FlexPanel.tsx +++ b/frontend/src/components/FlexPanel.tsx @@ -238,8 +238,15 @@ export function FlexPanel() { const PROC = [{ v: '0', l: 'NOR' }, { v: '1', l: 'DX' }, { v: '2', l: 'DX+' }]; const AGC = [{ v: 'off', l: 'OFF' }, { v: 'slow', l: 'SLOW' }, { v: 'med', l: 'MED' }, { v: 'fast', l: 'FAST' }]; const CW_BW = [100, 200, 300, 400, 500]; - const SSB_BW = [1800, 2100, 2400, 2800, 3000, 4000, 6000]; + const SSB_BW = [1800, 2100, 2400, 2700, 3000, 4000, 6000]; const curBW = Math.max(0, (st.filter_hi || 0) - (st.filter_lo || 0)); + // Highlight the preset CLOSEST to the radio's actual filter width. The rig + // rarely reports a width that lands exactly on a preset (e.g. 2.7k presets as + // 100–2790), so an exact/±50 match would leave nothing lit — "doesn't pick up + // the current filter". Snapping to the nearest preset always reflects the rig. + const ssbActiveBW = curBW > 0 + ? SSB_BW.reduce((best, bw) => (Math.abs(bw - curBW) < Math.abs(best - curBW) ? bw : best), SSB_BW[0]) + : -1; return (
@@ -416,7 +423,7 @@ export function FlexPanel() { FlexSetFilter(lo, hi).catch(() => {}); }} className={cn('px-1.5 py-1 text-[11px] font-bold tracking-wide transition-colors disabled:opacity-30 border-l border-border first:border-l-0', - Math.abs(curBW - bw) <= 50 ? 'bg-primary text-primary-foreground' : 'bg-card text-muted-foreground hover:bg-muted')}> + bw === ssbActiveBW ? 'bg-primary text-primary-foreground' : 'bg-card text-muted-foreground hover:bg-muted')}> {(bw / 1000).toFixed(1)} ))} diff --git a/frontend/src/version.ts b/frontend/src/version.ts index c0b1b66..7c34b06 100644 --- a/frontend/src/version.ts +++ b/frontend/src/version.ts @@ -1,6 +1,6 @@ // Single source of truth for the app version shown in the UI (header + About). // Bump this on a release (the release script updates it alongside telemetry.go). -export const APP_VERSION = '0.13'; +export const APP_VERSION = '0.14'; // Author / credits, shown in Help -> About. export const APP_AUTHOR = 'F4BPO'; diff --git a/telemetry.go b/telemetry.go index 22cb77f..0438b5b 100644 --- a/telemetry.go +++ b/telemetry.go @@ -21,7 +21,7 @@ import ( const ( // appVersion is stamped on every heartbeat (and could feed the About box). - appVersion = "0.13" + appVersion = "0.14" // posthogHost is the PostHog ingestion endpoint. EU cloud by default; change // to https://us.i.posthog.com for a US project.