Skip to content

Commit

Permalink
PowerSave switch revert.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Jan 26, 2016
1 parent 30a14d0 commit 1f6c583
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion main/gen_gdl90.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,6 @@ type settings struct {
PPM int
OwnshipModeS string
WatchList string
PowerSave bool
}

type status struct {
Expand Down
2 changes: 0 additions & 2 deletions main/managementinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ func handleSettingsSetRequest(w http.ResponseWriter, r *http.Request) {
globalSettings.GPS_Enabled = val.(bool)
case "AHRS_Enabled":
globalSettings.AHRS_Enabled = val.(bool)
case "PowerSave":
globalSettings.PowerSave = val.(bool)
case "DEBUG":
globalSettings.DEBUG = val.(bool)
case "ReplayLog":
Expand Down
2 changes: 1 addition & 1 deletion main/sdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func sdrWatcher() {
// UAT specific handling

// Shutdown UAT for 50 seconds, check every 60 seconds if the count is 0.
if globalSettings.PowerSave && stratuxClock.Since(lastUATCheck) >= 1*time.Minute {
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()
Expand Down
2 changes: 1 addition & 1 deletion web/plates/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function SettingsCtrl($rootScope, $scope, $state, $http) {

$scope.$parent.helppage = 'plates/settings-help.html';

var toggles = ['UAT_Enabled', 'ES_Enabled', 'GPS_Enabled', 'AHRS_Enabled', 'PowerSave', 'DEBUG', 'ReplayLog']; // DEBUG is 'DspTrafficSrc'
var toggles = ['UAT_Enabled', 'ES_Enabled', 'GPS_Enabled', 'AHRS_Enabled', 'DEBUG', 'ReplayLog']; // DEBUG is 'DspTrafficSrc'
var settings = {};
for (i = 0; i < toggles.length; i++) {
settings[toggles[i]] = undefined;
Expand Down
6 changes: 0 additions & 6 deletions web/plates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<ui-switch ng-model='AHRS_Enabled' settings-change></ui-switch>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-7">AHRS</label>
<div class="col-xs-5">
<ui-switch ng-model='PowerSave' settings-change></ui-switch>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 1f6c583

Please sign in to comment.