From 2475e5dd5ae1e17ad7855cab76c289058265953e Mon Sep 17 00:00:00 2001 From: James Smith Date: Wed, 13 May 2026 09:07:42 +0100 Subject: [PATCH] fix(drone): show sidebar panel and expose SDR config options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove inline style="display: none;" that was preventing the droneMode panel from becoming visible when the active class was toggled — inline styles override CSS class rules without !important. Add RTL-SDR device index and HackRF toggle inputs that the backend already accepted but were never surfaced in the UI; wire them through to the /drone/start POST body. Co-Authored-By: Claude Sonnet 4.6 --- static/js/modes/drone.js | 4 +++- templates/partials/modes/drone.html | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/static/js/modes/drone.js b/static/js/modes/drone.js index d7b7777..dbc3fee 100644 --- a/static/js/modes/drone.js +++ b/static/js/modes/drone.js @@ -159,10 +159,12 @@ function _start() { const iface = document.getElementById('droneWifiIface')?.value.trim() || null; + const rtlIndex = parseInt(document.getElementById('droneRtlIndex')?.value, 10) || 0; + const useHackrf = document.getElementById('droneUseHackrf')?.checked ?? true; fetch('/drone/start', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ wifi_iface: iface }), + body: JSON.stringify({ wifi_iface: iface, rtl_sdr_index: rtlIndex, use_hackrf: useHackrf }), }) .then(function (r) { return r.json(); }) .then(function () { _setRunningUI(true); _refreshStatus(); }) diff --git a/templates/partials/modes/drone.html b/templates/partials/modes/drone.html index c39babf..4f6ea23 100644 --- a/templates/partials/modes/drone.html +++ b/templates/partials/modes/drone.html @@ -1,5 +1,5 @@ -