feat: Added chat when MySQL is in use
This commit is contained in:
@@ -327,6 +327,7 @@ type FlexController interface {
|
||||
SetCWSidetone(bool) error
|
||||
SetSidetoneLevel(int) error
|
||||
SetCWFilter(int) error
|
||||
SetFilter(lo, hi int) error
|
||||
// External amplifier (PowerGenius XL) operate/standby.
|
||||
SetAmpOperate(bool) error
|
||||
}
|
||||
|
||||
@@ -1220,6 +1220,27 @@ func (f *Flex) SetCWFilter(bw int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetFilter sets the active RX slice's passband to an explicit low/high cut (Hz,
|
||||
// audio offsets; negative for LSB). Used by the SSB width presets, where the
|
||||
// frontend keeps the carrier-side edge and extends the far edge.
|
||||
func (f *Flex) SetFilter(lo, hi int) error {
|
||||
f.mu.Lock()
|
||||
idx, rx := f.rxSliceLocked()
|
||||
connected := f.conn != nil
|
||||
if rx != nil {
|
||||
rx.filterLo, rx.filterHi = lo, hi
|
||||
}
|
||||
f.mu.Unlock()
|
||||
if !connected {
|
||||
return fmt.Errorf("flex: not connected")
|
||||
}
|
||||
if rx == nil || idx < 0 {
|
||||
return fmt.Errorf("flex: no receive slice")
|
||||
}
|
||||
f.send(fmt.Sprintf("filt %d %d %d", idx, lo, hi))
|
||||
return nil
|
||||
}
|
||||
|
||||
// boolWord renders a Flex on/off boolean as the word form some commands want.
|
||||
func boolWord(on bool) string {
|
||||
if on {
|
||||
|
||||
Reference in New Issue
Block a user