From 95e0309c632871ad451cf71ce3751d801eac5c83 Mon Sep 17 00:00:00 2001 From: Smittix Date: Thu, 15 Jan 2026 23:02:52 +0000 Subject: [PATCH] Add configurable 8.33 kHz channel spacing for airband When using custom frequency, a spacing selector appears allowing choice between 25 kHz (standard) and 8.33 kHz (European) channel spacing. The frequency step adjusts accordingly. Co-Authored-By: Claude Opus 4.5 --- templates/adsb_dashboard.html | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index 2cb4731..3baaccd 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -254,7 +254,11 @@ - + + @@ -3056,10 +3060,13 @@ sudo make install function updateAirbandFreq() { const select = document.getElementById('airbandFreqSelect'); const customInput = document.getElementById('airbandCustomFreq'); + const spacingSelect = document.getElementById('airbandSpacing'); if (select.value === 'custom') { customInput.style.display = 'inline-block'; + spacingSelect.style.display = 'inline-block'; } else { customInput.style.display = 'none'; + spacingSelect.style.display = 'none'; // If audio is playing, restart on new frequency if (isAirbandPlaying) { stopAirband(); @@ -3068,6 +3075,18 @@ sudo make install } } + function updateAirbandSpacing() { + const spacing = document.getElementById('airbandSpacing').value; + const customInput = document.getElementById('airbandCustomFreq'); + if (spacing === '8.33') { + // 8.33 kHz = 0.00833 MHz + customInput.step = '0.00833'; + } else { + // 25 kHz = 0.025 MHz + customInput.step = '0.025'; + } + } + // Handle custom frequency input changes document.addEventListener('DOMContentLoaded', () => { const customInput = document.getElementById('airbandCustomFreq');