feat(amp): command linked amplifiers together for a combiner
The SPE CO1-2 combiner is an RF device: it sums two amplifiers and commands nothing. So "combined" operation is really two amplifiers that must be held in the same state, and one left in STANDBY while the other keys means the combiner sees power on a single input. A switch in Settings → Amplifier makes ON, OFF and OPERATE act on every configured amplifier. Offered only with two or more: coupling one amplifier to itself is a switch that cannot do anything. The METERS stay per amplifier, deliberately. Two amps combined are still two amps, and an operator watching for one of them to run away needs to see them apart — a summed bar would hide exactly the fault worth catching. Fanned out in AmpOperate/AmpPower rather than in the UI: the card and the docked widget both call these, and a coupling built into one would be missing from the other, which on a combiner means one amplifier keyed and one not. The clicked amplifier goes first, so a partial failure still did what the operator asked before it stopped. While linked, an amplifier with no power command — a PGXL on its direct link — is skipped silently rather than reported: it would make a successful pair look broken.
This commit is contained in:
@@ -52,7 +52,7 @@ import {
|
||||
GetADIFMonitor, SaveADIFMonitor, PickADIFMonitorFile,
|
||||
GetRelayAuto, SaveRelayAuto, GetStationDevices,
|
||||
GetAwardDefs, GetTrackedAwards, SaveTrackedAwards,
|
||||
GetBandOpenSettings, SaveBandOpenSettings, GetPSKReporterStatus, GetChaseNewGrids, SetChaseNewGrids, GetGridCacheStatus, GetSpotTTLMinutes, SetSpotTTLMinutes,
|
||||
GetBandOpenSettings, SaveBandOpenSettings, GetPSKReporterStatus, GetChaseNewGrids, SetChaseNewGrids, GetGridCacheStatus, GetAmpsLinked, SetAmpsLinked, GetSpotTTLMinutes, SetSpotTTLMinutes,
|
||||
} from '../../wailsjs/go/main/App';
|
||||
import type { profile as profileModels } from '../../wailsjs/go/models';
|
||||
import type { LookupSettingsForm, StationSettingsForm, ListsSettingsForm, ModePresetForm } from '@/types';
|
||||
@@ -1274,6 +1274,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
// Amplifier list — operators can run SEVERAL amps (even two SPEs combined),
|
||||
// each with its own connection. Saved as a whole via SaveAmplifiers.
|
||||
const [amps, setAmps] = useState<AmpUI[]>([]);
|
||||
const [ampsLinked, setAmpsLinked] = useState(false);
|
||||
|
||||
// WinKeyer CW keyer settings + macro editor.
|
||||
type WKMac = { label: string; text: string };
|
||||
@@ -1571,6 +1572,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
(async () => {
|
||||
try { setBandOpen(await GetBandOpenSettings()); } catch { /* defaults stand */ }
|
||||
try { setChaseGrids(await GetChaseNewGrids()); } catch { /* defaults stand */ }
|
||||
try { setAmpsLinked(await GetAmpsLinked()); } catch { /* defaults stand */ }
|
||||
try { const n = await GetSpotTTLMinutes(); setSpotTTL(n); setSpotTTLText(String(n)); } catch { /* defaults stand */ }
|
||||
})();
|
||||
// Poll the feed while the panel is open: a live count is the only thing that
|
||||
@@ -3408,6 +3410,18 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
{amps.length === 0 && (
|
||||
<p className="text-sm text-muted-foreground">{t('amp.none')}</p>
|
||||
)}
|
||||
{/* Only offered with two or more: coupling one amplifier to itself is
|
||||
a switch that cannot do anything. */}
|
||||
{amps.length > 1 && (
|
||||
<label className="flex items-start gap-2 text-sm cursor-pointer">
|
||||
<Checkbox checked={ampsLinked} className="mt-0.5"
|
||||
onCheckedChange={(c) => { setAmpsLinked(!!c); SetAmpsLinked(!!c).catch(() => {}); }} />
|
||||
<span>
|
||||
{t('amp.linked')}
|
||||
<span className="block text-xs text-muted-foreground mt-0.5">{t('amp.linkedHint')}</span>
|
||||
</span>
|
||||
</label>
|
||||
)}
|
||||
{amps.map((amp, i) => {
|
||||
const brand = brandOf(amp.type);
|
||||
const isPGXL = brand === 'pgxl';
|
||||
|
||||
Reference in New Issue
Block a user