diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index a8f3f2c..ae077ad 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -274,7 +274,7 @@ - + @@ -1947,21 +1947,27 @@ ACARS: ${r.statistics.acarsMessages} messages`; } else { devices.forEach((dev, i) => { const idx = dev.index !== undefined ? dev.index : i; - const name = dev.name || dev.type || 'RTL-SDR'; - const shortName = `SDR ${idx}`; + + // Build descriptive label + const type = dev.sdr_type || dev.driver || 'RTL-SDR'; + const typeName = type.toUpperCase().replace('RTLSDR', 'RTL-SDR'); + const shortSerial = dev.serial ? ` (${dev.serial.slice(-4)})` : ''; + const displayName = `${typeName} #${idx}${shortSerial}`; + const fullName = dev.name || `${typeName} Device ${idx}`; + const tooltip = `${fullName}${dev.serial ? ' - Serial: ' + dev.serial : ''}`; // Add to ADS-B selector const adsbOpt = document.createElement('option'); adsbOpt.value = idx; - adsbOpt.textContent = shortName; - adsbOpt.title = name; + adsbOpt.textContent = displayName; + adsbOpt.title = tooltip; adsbSelect.appendChild(adsbOpt); // Add to Airband selector const airbandOpt = document.createElement('option'); airbandOpt.value = idx; - airbandOpt.textContent = shortName; - airbandOpt.title = name; + airbandOpt.textContent = displayName; + airbandOpt.title = tooltip; airbandSelect.appendChild(airbandOpt); }); @@ -2992,6 +2998,8 @@ sudo make install const device = parseInt(document.getElementById('airbandDeviceSelect').value); const squelch = parseInt(document.getElementById('airbandSquelch').value); + console.log('[AIRBAND] Starting with device:', device, 'freq:', frequency, 'squelch:', squelch); + // Check if ADS-B tracking is using this device if (isTracking && adsbActiveDevice !== null && device === adsbActiveDevice) { const useAnyway = confirm( @@ -3073,7 +3081,6 @@ sudo make install document.getElementById('airbandStatus').textContent = frequency.toFixed(3) + ' MHz'; document.getElementById('airbandStatus').style.color = 'var(--accent-green)'; document.getElementById('airbandVisualizerContainer').style.display = 'flex'; - document.getElementById('airbandPlayer').style.display = 'block'; } catch (err) { console.error('[AIRBAND] Error:', err); @@ -3090,7 +3097,6 @@ sudo make install const audioPlayer = document.getElementById('airbandPlayer'); audioPlayer.pause(); audioPlayer.src = ''; - audioPlayer.style.display = 'none'; fetch('/listening/audio/stop', { method: 'POST' }) .then(r => r.json())