feat: Added chat when MySQL is in use

This commit is contained in:
2026-06-21 02:30:01 +02:00
parent a9f2e515e1
commit 0e2ef317c3
10 changed files with 120 additions and 19 deletions
+1
View File
@@ -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
}
+21
View File
@@ -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 {