Fix double tone-generator start in tone-test mode

connect() starts the tone generator but didn't set b.Tx=true,
so setTransmit would start a second instance. Now b.Tx is set
so the UI toggle works as a stop/restart instead of double-start.
This commit is contained in:
Brandon McGinty (deepseek)
2026-08-09 01:02:53 -04:00
committed by Brandon McGinty
parent 5b9b3ad421
commit 63941f7785
+1
View File
@@ -59,6 +59,7 @@ func (b *Barnard) connect(reconnect bool) bool {
// Start the tone generator goroutine.
b.toneTestStop = make(chan struct{})
go StartToneGenerator(b.Client, b.toneTestStop)
b.Tx = true
// Attach the audio file saver.
saver, err := NewAudioFileSaver(b.ToneTestOutput)