feat: Adding XIT RIT in the Flex panel

This commit is contained in:
2026-07-14 23:54:06 +02:00
parent 9718b8a78f
commit 9e2ffdb758
8 changed files with 198 additions and 2 deletions
+30
View File
@@ -9684,6 +9684,36 @@ func (a *App) FlexApplyBandAntenna(band string) error {
})
}
// RIT/XIT on the active slice. The offset is kept by the radio when the switch is
// off, so turning it back on restores it — the UI must not zero it on toggle.
func (a *App) FlexSetRIT(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.FlexDo(func(fc cat.FlexController) error { return fc.SetRIT(on) })
}
func (a *App) FlexSetRITFreq(hz int) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.FlexDo(func(fc cat.FlexController) error { return fc.SetRITFreq(hz) })
}
func (a *App) FlexSetXIT(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.FlexDo(func(fc cat.FlexController) error { return fc.SetXIT(on) })
}
func (a *App) FlexSetXITFreq(hz int) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.FlexDo(func(fc cat.FlexController) error { return fc.SetXITFreq(hz) })
}
func (a *App) FlexSetNB(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")