Skip to content

Commit

Permalink
Remove UAT SDR powersave.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Jan 26, 2016
1 parent 1f6c583 commit 1be927e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions main/sdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@ func sdrKill() {

// Watch for config/device changes.
func sdrWatcher() {
stopCheckingUATUntil := time.Time{}

lastUATCheck := stratuxClock.Time

for {
time.Sleep(1 * time.Second)
if sdrShutdown {
Expand Down Expand Up @@ -346,22 +342,10 @@ func sdrWatcher() {
}

// UAT specific handling

// Shutdown UAT for 50 seconds, check every 60 seconds if the count is 0.
if stratuxClock.Since(lastUATCheck) >= 1*time.Minute {
if UATDev != nil && globalStatus.UAT_messages_last_minute == 0 {
log.Printf("Pausing UAT listening for 50 seconds - none received.\n")
UATDev.shutdown()
UATDev = nil
stopCheckingUATUntil = stratuxClock.Time.Add(50 * time.Second)
}
lastUATCheck = stratuxClock.Time
}

// When count is one, favor UAT in the case where the user
// has enabled both UAT and ES via the web interface.
id := 0
if globalSettings.UAT_Enabled && stratuxClock.Time.After(stopCheckingUATUntil) {
if globalSettings.UAT_Enabled {
// log.Println("globalSettings.UAT_Enabled == true")
if count == 1 {
if ESDev != nil {
Expand Down

0 comments on commit 1be927e

Please sign in to comment.