mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 14:50:00 -07:00
Remove redundant SDR device selector from APRS configuration
APRS now uses the global device selector in the sidebar like other modes
This commit is contained in:
@@ -2092,7 +2092,6 @@
|
|||||||
} else if (mode === 'aprs') {
|
} else if (mode === 'aprs') {
|
||||||
checkAprsTools();
|
checkAprsTools();
|
||||||
initAprsMap();
|
initAprsMap();
|
||||||
refreshAprsDevices();
|
|
||||||
// Fix map sizing on mobile after container becomes visible
|
// Fix map sizing on mobile after container becomes visible
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (aprsMap) aprsMap.invalidateSize();
|
if (aprsMap) aprsMap.invalidateSize();
|
||||||
@@ -7309,30 +7308,6 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshAprsDevices() {
|
|
||||||
fetch('/devices')
|
|
||||||
.then(r => r.json())
|
|
||||||
.then(devices => {
|
|
||||||
const select = document.getElementById('aprsDevice');
|
|
||||||
select.innerHTML = '';
|
|
||||||
if (devices.length === 0) {
|
|
||||||
select.innerHTML = '<option value="">No SDR devices found</option>';
|
|
||||||
} else {
|
|
||||||
devices.forEach(dev => {
|
|
||||||
const opt = document.createElement('option');
|
|
||||||
opt.value = dev.index;
|
|
||||||
opt.textContent = `${dev.index}: ${dev.name || 'Unknown'}`;
|
|
||||||
select.appendChild(opt);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.error('Failed to refresh APRS devices:', err);
|
|
||||||
const select = document.getElementById('aprsDevice');
|
|
||||||
select.innerHTML = '<option value="0">Error loading devices</option>';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateAprsStatus(state, freq) {
|
function updateAprsStatus(state, freq) {
|
||||||
const statusBar = document.getElementById('aprsStatusBar');
|
const statusBar = document.getElementById('aprsStatusBar');
|
||||||
const statusDot = document.getElementById('aprsStatusDot');
|
const statusDot = document.getElementById('aprsStatusDot');
|
||||||
@@ -7361,7 +7336,7 @@
|
|||||||
|
|
||||||
function startAprs() {
|
function startAprs() {
|
||||||
const region = document.getElementById('aprsRegion').value;
|
const region = document.getElementById('aprsRegion').value;
|
||||||
const device = document.getElementById('aprsDevice').value;
|
const device = getSelectedDevice();
|
||||||
const gain = document.getElementById('aprsGain').value;
|
const gain = document.getElementById('aprsGain').value;
|
||||||
|
|
||||||
fetch('/aprs/start', {
|
fetch('/aprs/start', {
|
||||||
|
|||||||
@@ -21,12 +21,6 @@
|
|||||||
<option value="japan">Japan (144.640)</option>
|
<option value="japan">Japan (144.640)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>SDR Device</label>
|
|
||||||
<select id="aprsDevice">
|
|
||||||
<option value="">Loading devices...</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Gain (dB)</label>
|
<label>Gain (dB)</label>
|
||||||
<input type="text" id="aprsGain" value="40" placeholder="40">
|
<input type="text" id="aprsGain" value="40" placeholder="40">
|
||||||
|
|||||||
Reference in New Issue
Block a user