Remove globalSettings.AHRS_Enabled.

pull/544/head
Christopher Young 2016-11-17 19:01:03 -05:00
rodzic d60248b660
commit 0ed4c0bfb7
7 zmienionych plików z 3 dodań i 43 usunięć

Wyświetl plik

@ -430,9 +430,7 @@ func makeStratuxStatus() []byte {
}
// Valid/Enabled: AHRS Enabled portion.
if globalSettings.AHRS_Enabled {
msg[12] = 1 << 0
}
// msg[12] = 1 << 0
// Valid/Enabled: last bit unused.
@ -991,7 +989,6 @@ type settings struct {
GPS_Enabled bool
NetworkOutputs []networkConnection
SerialOutputs map[string]serialConnection
AHRS_Enabled bool
DisplayTrafficSource bool
DEBUG bool
ReplayLog bool
@ -1056,7 +1053,6 @@ func defaultSettings() {
{Conn: nil, Ip: "", Port: 4000, Capability: NETWORK_GDL90_STANDARD | NETWORK_AHRS_GDL90},
// {Conn: nil, Ip: "", Port: 49002, Capability: NETWORK_AHRS_FFSIM},
}
globalSettings.AHRS_Enabled = false
globalSettings.DEBUG = false
globalSettings.DisplayTrafficSource = false
globalSettings.ReplayLog = false //TODO: 'true' for debug builds.

Wyświetl plik

@ -274,8 +274,6 @@ func handleSettingsSetRequest(w http.ResponseWriter, r *http.Request) {
globalSettings.Ping_Enabled = val.(bool)
case "GPS_Enabled":
globalSettings.GPS_Enabled = val.(bool)
case "AHRS_Enabled":
globalSettings.AHRS_Enabled = val.(bool)
case "DEBUG":
globalSettings.DEBUG = val.(bool)
case "DisplayTrafficSource":

Wyświetl plik

@ -1938,7 +1938,7 @@ func gpsAttitudeSender() {
for {
<-timer.C
myGPSPerfStats = make([]gpsPerfStats, 0) // reinitialize statistics on disconnect / reconnect
for globalSettings.GPS_Enabled && globalStatus.GPS_connected /*&& globalSettings.GPSAttitude_Enabled*/ && !(globalSettings.AHRS_Enabled) {
for globalSettings.GPS_Enabled && globalStatus.GPS_connected {
<-timer.C
if mySituation.Quality == 0 || !calcGPSAttitude() {

Wyświetl plik

@ -130,7 +130,6 @@ Stratux makes available a webserver to retrieve statistics which may be useful t
"Capability": 2
}
],
"AHRS_Enabled": false,
"DEBUG": false,
"ReplayLog": true,
"PPM": 0,

Wyświetl plik

@ -6,7 +6,7 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
$scope.$parent.helppage = 'plates/settings-help.html';
var toggles = ['UAT_Enabled', 'ES_Enabled', 'Ping_Enabled', 'GPS_Enabled', 'AHRS_Enabled', 'DisplayTrafficSource', 'DEBUG', 'ReplayLog'];
var toggles = ['UAT_Enabled', 'ES_Enabled', 'Ping_Enabled', 'GPS_Enabled', 'DisplayTrafficSource', 'DEBUG', 'ReplayLog'];
var settings = {};
for (i = 0; i < toggles.length; i++) {
settings[toggles[i]] = undefined;
@ -26,7 +26,6 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
$scope.ES_Enabled = settings.ES_Enabled;
$scope.Ping_Enabled = settings.Ping_Enabled;
$scope.GPS_Enabled = settings.GPS_Enabled;
$scope.AHRS_Enabled = settings.AHRS_Enabled;
$scope.DisplayTrafficSource = settings.DisplayTrafficSource;
$scope.DEBUG = settings.DEBUG;
$scope.ReplayLog = settings.ReplayLog;

Wyświetl plik

@ -109,7 +109,6 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
$scope.visible_es = true;
}
$scope.visible_gps = settings.GPS_Enabled;
$scope.visible_ahrs = settings.AHRS_Enabled;
}, function (response) {
// nop
});

Wyświetl plik

@ -28,12 +28,6 @@
<ui-switch ng-model='GPS_Enabled' settings-change></ui-switch>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-7"><a ui-turn-on="modalAHRSHardwareInfo">AHRS Module</a></label>
<div class="col-xs-5">
<ui-switch ng-model='AHRS_Enabled' settings-change></ui-switch>
</div>
</div>
</div>
</div>
</div>
@ -214,30 +208,5 @@
</div>
</div>
</div>
<div class="modal" ui-if="modalAHRSHardwareInfo" ui-state="modalAHRSHardwareInfo">
<div class="modal-overlay "></div>
<div class="vertical-alignment-helper center-block">
<div class="modal-dialog vertical-align-center">
<div class="modal-content">
<div class="modal-header">
<button class="close" ui-turn-off="modalAHRSHardwareInfo"></button>
<h4 class="modal-title">AHRS Module Support: Information Note</h4>
</div>
<div class="modal-body">
<p>Enabling this option will allow Stratux to read a BMP180 pressure sensor and a MPU6050 6-axis gyro / accelerometer connected to the Raspberry Pi GPIO (I2C) pins. The Reyax RY835AI AHRS / GPS module includes both of these sensors.</p>
<p><strong>AHRS support is still experimental, and will not correctly indicate roll angle during coordinated turns.</strong></p>
<p>Refer to the README / FAQ at <a href="http://stratux.me">stratux.me</a> for current hardware support.</p>
</div>
<div class="modal-footer">
<a ui-turn-off="modalAHRSHardwareInfo" class="btn btn-primary">Acknowledge</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>