feat: icom Scope in Icom Tab

This commit is contained in:
2026-07-04 22:06:26 +02:00
parent abbdde9367
commit dd4b0004a5
8 changed files with 918 additions and 56 deletions
+60
View File
@@ -7540,6 +7540,66 @@ func (a *App) IcomSetFilter(n int) error {
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetIcomFilter(n) })
}
func (a *App) IcomSetRFPower(p int) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetRFPower(p) })
}
func (a *App) IcomSetMicGain(p int) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetMicGain(p) })
}
func (a *App) IcomSetSplit(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetIcomSplit(on) })
}
func (a *App) IcomTune() error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.TuneATU() })
}
// IcomSetScope enables/disables the spectrum-scope waveform stream.
func (a *App) IcomSetScope(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetScope(on) })
}
// IcomScopeData returns the latest reassembled spectrum sweep for the panadapter.
func (a *App) IcomScopeData() cat.ScopeSweep {
if a.cat == nil {
return cat.ScopeSweep{}
}
sw, _ := a.cat.IcomScope()
return sw
}
// IcomSetScopeMode selects fixed-span (true) or center-on-VFO (false) scope mode.
func (a *App) IcomSetScopeMode(fixed bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.IcomDo(func(ic cat.IcomController) error { return ic.SetScopeMode(fixed) })
}
func (a *App) IcomSetPTT(on bool) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.SetPTT(on)
}
func (a *App) FlexSetPower(p int) error {
if a.cat == nil {
return fmt.Errorf("cat not initialized")