feat: Implemented scope on Ethernet for Icom
This commit is contained in:
@@ -1113,6 +1113,13 @@ func (a *App) shutdown(ctx context.Context) {
|
||||
if a.udp != nil {
|
||||
a.udp.StopAll()
|
||||
}
|
||||
// Stop CAT so the backend disconnects cleanly. Critical for the Icom network
|
||||
// backend: without this the rig never gets a disconnect and holds its single
|
||||
// control session for minutes, refusing every new login (even from the Icom
|
||||
// Remote Utility) until it times out on its own.
|
||||
if a.cat != nil {
|
||||
a.cat.Stop()
|
||||
}
|
||||
if a.winkeyer != nil {
|
||||
a.winkeyer.Disconnect()
|
||||
}
|
||||
@@ -7885,6 +7892,97 @@ func (a *App) IcomSetSplit(on bool) error {
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetIcomSplit(on) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetAntenna(n int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetAntenna(n) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetPBTInner(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetPBTInner(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetPBTOuter(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetPBTOuter(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetManualNotch(on bool) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetManualNotch(on) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetNotchPos(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetNotchPos(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetSquelch(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetSquelch(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetComp(on bool) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetComp(on) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetCompLevel(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetCompLevel(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetMonitor(on bool) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetMonitor(on) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetMonLevel(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetMonLevel(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetVOX(on bool) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetVOX(on) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetVOXGain(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetVOXGain(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomSetAntiVOX(p int) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetAntiVOX(p) })
|
||||
}
|
||||
|
||||
func (a *App) IcomTune() error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
@@ -7892,6 +7990,15 @@ func (a *App) IcomTune() error {
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.TuneATU() })
|
||||
}
|
||||
|
||||
// IcomSetPower turns the radio on or off (manual — the app never wakes the rig
|
||||
// on connect). ON sends a wake preamble + CI-V 0x18 01; the rig then boots ~15s.
|
||||
func (a *App) IcomSetPower(on bool) error {
|
||||
if a.cat == nil {
|
||||
return fmt.Errorf("cat not initialized")
|
||||
}
|
||||
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetPower(on) })
|
||||
}
|
||||
|
||||
// IcomSetScope enables/disables the spectrum-scope waveform stream.
|
||||
func (a *App) IcomSetScope(on bool) error {
|
||||
if a.cat == nil {
|
||||
|
||||
Reference in New Issue
Block a user