Skip to content

Commit

Permalink
add grace period between changing the mode and setting the filter band
Browse files Browse the repository at this point in the history
  • Loading branch information
ftl committed Dec 25, 2021
1 parent e51c306 commit 94dd8af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/tci/buttons.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"image"
"log"
"time"

"github.com/ftl/hamradio"
"github.com/ftl/hamradio/bandplan"
Expand Down Expand Up @@ -564,6 +565,10 @@ func (b *SetFilterButton) Pressed() {
}
}

// add a grace period before setting the filter band, otherwise ExpertSDR will restore
// the last filter band for this mode and overwrite our setting
time.Sleep(200 * time.Millisecond)

err := b.client.SetRXFilterBand(b.currentTRX, b.bottomFrequency, b.topFrequency)
if err != nil {
log.Printf("cannot set rx filter band: %v", err)
Expand Down

0 comments on commit 94dd8af

Please sign in to comment.