feat: add rtl_tcp remote SDR support to aprs, morse, and dsc routes

Closes #164. Only pager and sensor routes supported rtl_tcp connections.
Now aprs, morse, and dsc routes follow the same pattern: extract
rtl_tcp_host/port from the request, skip local device claiming for
remote connections, and use SDRFactory.create_network_device(). DSC also
refactored from manual rtl_fm command building to use SDRFactory's
builder abstraction. Frontend wired up for all three modes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-28 19:21:28 +00:00
parent 153aacba03
commit c1339b6c65
6 changed files with 164 additions and 65 deletions

View File

@@ -1179,6 +1179,19 @@
const isAgentMode = typeof aisCurrentAgent !== 'undefined' && aisCurrentAgent !== 'local';
dscCurrentAgent = isAgentMode ? aisCurrentAgent : null;
// Check for remote SDR (only for local mode)
const remoteConfig = (!isAgentMode && typeof getRemoteSDRConfig === 'function')
? getRemoteSDRConfig() : null;
if (remoteConfig === false) return; // Validation failed
const requestBody = { device, gain };
// Add rtl_tcp params if using remote SDR
if (remoteConfig) {
requestBody.rtl_tcp_host = remoteConfig.host;
requestBody.rtl_tcp_port = remoteConfig.port;
}
// Determine endpoint based on agent mode
const endpoint = isAgentMode
? `/controller/agents/${aisCurrentAgent}/dsc/start`
@@ -1187,7 +1200,7 @@
fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ device, gain })
body: JSON.stringify(requestBody)
})
.then(r => r.json())
.then(data => {