Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bf2c9dd93 | ||
|
|
575a99feb5 |
@@ -236,6 +236,12 @@ class MQTTManager:
|
||||
}
|
||||
payload["sdr_pins"] = config.sdr_pins
|
||||
secondary = await secondary_sdr_client.status()
|
||||
# Unreachable secondary-sdr: say so with explicit nulls. C2 only
|
||||
# overwrites keys present in the checkin, so omitting them would leave
|
||||
# a dead decoder showing "Running" forever.
|
||||
payload["secondary_sdr_running"] = None
|
||||
payload["sdr_devices"] = None
|
||||
payload["op25_sdr_serial"] = None
|
||||
if secondary is not None:
|
||||
payload["secondary_sdr_running"] = [r["mode"] for r in secondary.get("running", [])]
|
||||
if secondary.get("devices") is not None:
|
||||
|
||||
@@ -568,7 +568,8 @@
|
||||
return `<option value="">${esc(autoLabel)}</option>` +
|
||||
devs.map(d => `<option value="${esc(d.serial)}" ${d.serial === selected ? 'selected' : ''}>` +
|
||||
`SDR ${d.index + 1} · serial ${esc(d.serial)}${d.duplicate_serial ? ' (shared serial!)' : ''}</option>`).join('') +
|
||||
(selected && !known ? `<option value="${esc(selected)}" selected>serial ${esc(selected)} (not plugged in)</option>` : '');
|
||||
(selected && !known ? `<option value="${esc(selected)}" selected>serial ${esc(selected)} ` +
|
||||
`(${sdr.devices === null ? 'not reported' : 'not plugged in'})</option>` : '');
|
||||
}
|
||||
|
||||
function renderSdr() {
|
||||
@@ -585,7 +586,7 @@
|
||||
const running = sdr.running || [];
|
||||
sdrRows.forEach((row, i) => {
|
||||
const [name, hint] = SDR_LABELS[row.mode] || [row.mode, ''];
|
||||
const pinMissing = row.pin && !(sdr.devices || []).some(d => d.serial === row.pin);
|
||||
const pinMissing = row.pin && sdr.devices !== null && !sdr.devices.some(d => d.serial === row.pin);
|
||||
const state = !row.enabled ? 'Off'
|
||||
: sdrDirty ? 'Unsaved'
|
||||
: sdr.running === null ? 'Unknown'
|
||||
|
||||
Reference in New Issue
Block a user