kopia lustrzana https://github.com/cyoung/stratux
				
				
				
			PowerSave switch revert.
							rodzic
							
								
									30a14d0b2f
								
							
						
					
					
						commit
						1f6c58350e
					
				|  | @ -989,7 +989,6 @@ type settings struct { | |||
| 	PPM            int | ||||
| 	OwnshipModeS   string | ||||
| 	WatchList      string | ||||
| 	PowerSave      bool | ||||
| } | ||||
| 
 | ||||
| type status struct { | ||||
|  |  | |||
|  | @ -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": | ||||
|  |  | |||
|  | @ -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() | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -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> | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Christopher Young
						Christopher Young