diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index 9cd1e30..fbec6ee 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -339,6 +339,9 @@ + @@ -2444,6 +2447,7 @@ sudo make install const requestBody = { device: adsbDevice, sdr_type: adsbSdrType, + gain: parseInt(document.getElementById('adsbGainInput')?.value || '40'), bias_t: getBiasTEnabled() }; if (remoteConfig) { diff --git a/templates/index.html b/templates/index.html index f2ef0a5..49eb83a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6095,8 +6095,8 @@ 'rtlsdr': { name: 'RTL-SDR', freq_min: 24, freq_max: 1766, gain_min: 0, gain_max: 50 }, 'sdrplay': { name: 'SDRplay', freq_min: 0.001, freq_max: 2000, gain_min: 0, gain_max: 59 }, 'limesdr': { name: 'LimeSDR', freq_min: 0.1, freq_max: 3800, gain_min: 0, gain_max: 73 }, - 'hackrf': { name: 'HackRF', freq_min: 1, freq_max: 6000, gain_min: 0, gain_max: 62 }, - 'airspy': { name: 'Airspy', freq_min: 24, freq_max: 1800, gain_min: 0, gain_max: 21 } + 'hackrf': { name: 'HackRF', freq_min: 1, freq_max: 6000, gain_min: 0, gain_max: 102 }, // LNA(40)+VGA(62) + 'airspy': { name: 'Airspy', freq_min: 24, freq_max: 1800, gain_min: 0, gain_max: 45 } // LNA(15)+Mix(15)+VGA(15) }; // Current device list with SDR type info @@ -6225,6 +6225,12 @@ if (caps) { document.getElementById('capFreqRange').textContent = `${caps.freq_min}-${caps.freq_max} MHz`; document.getElementById('capGainRange').textContent = `${caps.gain_min}-${caps.gain_max} dB`; + // Update max attribute on all mode gain inputs so constraints match the SDR + const gainMax = caps.gain_max; + ['gain', 'sensorGain', 'aisGainInput', 'acarsGainInput', 'aprsStripGain', 'weatherSatGain'].forEach(id => { + const el = document.getElementById(id); + if (el) el.max = gainMax; + }); } } diff --git a/templates/partials/modes/pager.html b/templates/partials/modes/pager.html index c905b96..308d216 100644 --- a/templates/partials/modes/pager.html +++ b/templates/partials/modes/pager.html @@ -32,7 +32,7 @@