mirror of
https://github.com/smittix/intercept.git
synced 2026-06-09 14:41:55 -07:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -254,7 +254,11 @@
|
||||
<option value="134.725">134.725</option>
|
||||
<option value="custom">Custom...</option>
|
||||
</select>
|
||||
<input type="number" id="airbandCustomFreq" step="0.005" placeholder="MHz" class="airband-controls" style="width: 65px; display: none;">
|
||||
<input type="number" id="airbandCustomFreq" step="0.025" placeholder="MHz" class="airband-controls" style="width: 65px; display: none;">
|
||||
<select id="airbandSpacing" class="airband-controls" title="Channel spacing" style="width: 55px; display: none;" onchange="updateAirbandSpacing()">
|
||||
<option value="25">25 kHz</option>
|
||||
<option value="8.33">8.33 kHz</option>
|
||||
</select>
|
||||
<select id="airbandDeviceSelect" class="airband-controls" title="SDR for airband">
|
||||
<option value="0">SDR 0</option>
|
||||
</select>
|
||||
@@ -3056,10 +3060,13 @@ sudo make install</code>
|
||||
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</code>
|
||||
}
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user