fix(kpa): its own card, and no band-follow it does not need
Two things the wiring got wrong, both visible on screen. A KPA fell through to the PowerGenius branch of the amplifier card and was drawn as one — titled 'POWERGENIUSXL · ELECRAFT KPA1500', with a PowerGenius's meters and none of its own. It has a card now: OPERATE, ON and OFF, band, power, SWR, temperature, supply, and the fault across the end. The OPERATE button carries a tooltip saying it also clears the fault, because that is the button an operator already has under the cursor when they need it. And the band-follow option was offered on it. That option exists because an Acom POLLS a transceiver and has no command to be given a band, so following it needs a second serial port and a rig emulator answering those polls. The KPA has ^BN — OpsLog simply tells it, on the link it is already using, and only when the band CHANGES. The option is gone from the KPA and the telling is automatic. Also: Acom rather than ACOM everywhere it is read, which is how the company writes it. Identifiers, package names and log lines are left alone — renaming those is churn with no reader.
This commit is contained in:
@@ -18106,7 +18106,7 @@ func ampTypeLabel(t string) string {
|
||||
case strings.HasPrefix(t, "spe"):
|
||||
return "SPE " + map[string]string{"spe13": "1.3K-FA", "spe15": "1.5K-FA", "spe2k": "2K-FA"}[t]
|
||||
case strings.HasPrefix(t, "acom"):
|
||||
return "ACOM " + strings.TrimPrefix(t, "acom") + "S"
|
||||
return "Acom " + strings.TrimPrefix(t, "acom") + "S"
|
||||
case strings.HasPrefix(t, "kpa"):
|
||||
return "Elecraft " + strings.ToUpper(t)
|
||||
}
|
||||
@@ -18278,6 +18278,17 @@ func (a *App) feedAmpBandFollow(s cat.RigState) {
|
||||
inst.catemu.SetFrequency(s.FreqHz)
|
||||
inst.catemu.SetMode(s.Mode)
|
||||
}
|
||||
// A KPA is TOLD its band, on the link it is already on.
|
||||
//
|
||||
// The emulator above exists because an Acom polls a transceiver and has
|
||||
// no command to be given a band; the KPA has one (^BN), so it needs
|
||||
// neither a second serial port nor a pretend rig. Sent from a goroutine
|
||||
// because this runs on the CAT state-change path, and nothing about the
|
||||
// rig should wait on an amplifier's link.
|
||||
if inst.kpa != nil && s.Band != "" {
|
||||
k, band := inst.kpa, s.Band
|
||||
go func() { _ = k.SetBand(band) }()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18553,7 +18564,7 @@ func (a *App) GetACOMStatus() acom.Status {
|
||||
// protocol has explicit commands for each, unlike the SPE's toggle key.
|
||||
func (a *App) ACOMSetOperate(on bool) error {
|
||||
if a.acom == nil {
|
||||
return fmt.Errorf("ACOM amplifier not connected — enable it in Settings → Amplifier")
|
||||
return fmt.Errorf("Acom amplifier not connected — enable it in Settings → Amplifier")
|
||||
}
|
||||
return a.acom.Operate(on)
|
||||
}
|
||||
@@ -18562,7 +18573,7 @@ func (a *App) ACOMSetOperate(on bool) error {
|
||||
// the power-on pins wired in the cable) or off (false, the OFF data command).
|
||||
func (a *App) ACOMSetPower(on bool) error {
|
||||
if a.acom == nil {
|
||||
return fmt.Errorf("ACOM amplifier not connected — enable it in Settings → Amplifier")
|
||||
return fmt.Errorf("Acom amplifier not connected — enable it in Settings → Amplifier")
|
||||
}
|
||||
if on {
|
||||
return a.acom.PowerOn()
|
||||
|
||||
Reference in New Issue
Block a user