feat(gain): normalize gain controls across modes

- Pager and sensor gain inputs changed from unvalidated text fields to
  number inputs with min/max/step constraints
- ADS-B dashboard now exposes a gain input in the tracking strip;
  previously gain was hardcoded to 40 dB with no user control
- validate_gain() ceiling raised from 50 to 102 dB to support HackRF
  (LNA 40 + VGA 62 = 102 dB combined) and LimeSDR (73 dB)
- sdrCapabilities gain_max values corrected: HackRF 62→102, Airspy 21→45
- onSDRTypeChanged() now propagates gain_max to all mode gain inputs so
  HTML constraints match the selected SDR's actual range

Closes #162
This commit is contained in:
James Smith
2026-04-05 16:02:03 +01:00
parent 3ed4313854
commit 50de9a9932
5 changed files with 22 additions and 7 deletions
+4
View File
@@ -339,6 +339,9 @@
<select id="adsbDeviceSelect" title="SDR device for ADS-B (1090 MHz)">
<option value="0">SDR 0</option>
</select>
<label title="SDR gain in dB (0 = auto)" style="display:flex;align-items:center;gap:3px;font-size:11px;">
Gain <input type="number" id="adsbGainInput" value="40" min="0" max="50" step="1" style="width:46px;" title="SDR gain in dB">
</label>
<label class="bias-t-label" title="Enable Bias-T power for external LNA/preamp"><input type="checkbox" id="adsbBiasT" onchange="saveAdsbBiasTSetting()"> Bias-T</label>
<button class="start-btn" id="startBtn" onclick="toggleTracking()">START</button>
</div>
@@ -2444,6 +2447,7 @@ sudo make install</code>
const requestBody = {
device: adsbDevice,
sdr_type: adsbSdrType,
gain: parseInt(document.getElementById('adsbGainInput')?.value || '40'),
bias_t: getBiasTEnabled()
};
if (remoteConfig) {