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');