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:
committed by
Brandon McGinty
parent
5b9b3ad421
commit
63941f7785
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user