feat: added APF for CW in Icom

This commit is contained in:
2026-07-07 17:10:42 +02:00
parent 1cadefd207
commit ab06673854
11 changed files with 493 additions and 38 deletions
+11
View File
@@ -1166,6 +1166,9 @@ func (b *IcomSerial) readDSP() {
if v, ok := b.readSwitch(civ.SubSwANF); ok {
st.ANF = v != 0
}
if v, ok := b.readSwitch(civ.SubSwAPF); ok {
st.APF = v != 0
}
if v, ok := b.readSwitch(civ.SubSwAGC); ok {
st.AGC = agcName(v)
}
@@ -1357,6 +1360,14 @@ func (b *IcomSerial) SetANF(on bool) error {
return nil
}
func (b *IcomSerial) SetAPF(on bool) error {
if err := b.exec(civ.CmdSwitch, civ.SubSwAPF, boolByte(on)); err != nil {
return err
}
b.setCache(func(s *IcomTXState) { s.APF = on })
return nil
}
func (b *IcomSerial) SetAGC(name string) error {
v := agcValue(name)
if v == 0 {