kopia lustrzana https://github.com/cyoung/stratux
Remove globalSettings.AHRS_Enabled.
rodzic
d60248b660
commit
0ed4c0bfb7
|
|
@ -430,9 +430,7 @@ func makeStratuxStatus() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid/Enabled: AHRS Enabled portion.
|
// Valid/Enabled: AHRS Enabled portion.
|
||||||
if globalSettings.AHRS_Enabled {
|
// msg[12] = 1 << 0
|
||||||
msg[12] = 1 << 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valid/Enabled: last bit unused.
|
// Valid/Enabled: last bit unused.
|
||||||
|
|
||||||
|
|
@ -991,7 +989,6 @@ type settings struct {
|
||||||
GPS_Enabled bool
|
GPS_Enabled bool
|
||||||
NetworkOutputs []networkConnection
|
NetworkOutputs []networkConnection
|
||||||
SerialOutputs map[string]serialConnection
|
SerialOutputs map[string]serialConnection
|
||||||
AHRS_Enabled bool
|
|
||||||
DisplayTrafficSource bool
|
DisplayTrafficSource bool
|
||||||
DEBUG bool
|
DEBUG bool
|
||||||
ReplayLog 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: 4000, Capability: NETWORK_GDL90_STANDARD | NETWORK_AHRS_GDL90},
|
||||||
// {Conn: nil, Ip: "", Port: 49002, Capability: NETWORK_AHRS_FFSIM},
|
// {Conn: nil, Ip: "", Port: 49002, Capability: NETWORK_AHRS_FFSIM},
|
||||||
}
|
}
|
||||||
globalSettings.AHRS_Enabled = false
|
|
||||||
globalSettings.DEBUG = false
|
globalSettings.DEBUG = false
|
||||||
globalSettings.DisplayTrafficSource = false
|
globalSettings.DisplayTrafficSource = false
|
||||||
globalSettings.ReplayLog = false //TODO: 'true' for debug builds.
|
globalSettings.ReplayLog = false //TODO: 'true' for debug builds.
|
||||||
|
|
|
||||||
|
|
@ -274,8 +274,6 @@ func handleSettingsSetRequest(w http.ResponseWriter, r *http.Request) {
|
||||||
globalSettings.Ping_Enabled = val.(bool)
|
globalSettings.Ping_Enabled = val.(bool)
|
||||||
case "GPS_Enabled":
|
case "GPS_Enabled":
|
||||||
globalSettings.GPS_Enabled = val.(bool)
|
globalSettings.GPS_Enabled = val.(bool)
|
||||||
case "AHRS_Enabled":
|
|
||||||
globalSettings.AHRS_Enabled = val.(bool)
|
|
||||||
case "DEBUG":
|
case "DEBUG":
|
||||||
globalSettings.DEBUG = val.(bool)
|
globalSettings.DEBUG = val.(bool)
|
||||||
case "DisplayTrafficSource":
|
case "DisplayTrafficSource":
|
||||||
|
|
|
||||||
|
|
@ -1938,7 +1938,7 @@ func gpsAttitudeSender() {
|
||||||
for {
|
for {
|
||||||
<-timer.C
|
<-timer.C
|
||||||
myGPSPerfStats = make([]gpsPerfStats, 0) // reinitialize statistics on disconnect / reconnect
|
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
|
<-timer.C
|
||||||
|
|
||||||
if mySituation.Quality == 0 || !calcGPSAttitude() {
|
if mySituation.Quality == 0 || !calcGPSAttitude() {
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,6 @@ Stratux makes available a webserver to retrieve statistics which may be useful t
|
||||||
"Capability": 2
|
"Capability": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"AHRS_Enabled": false,
|
|
||||||
"DEBUG": false,
|
"DEBUG": false,
|
||||||
"ReplayLog": true,
|
"ReplayLog": true,
|
||||||
"PPM": 0,
|
"PPM": 0,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
||||||
|
|
||||||
$scope.$parent.helppage = 'plates/settings-help.html';
|
$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 = {};
|
var settings = {};
|
||||||
for (i = 0; i < toggles.length; i++) {
|
for (i = 0; i < toggles.length; i++) {
|
||||||
settings[toggles[i]] = undefined;
|
settings[toggles[i]] = undefined;
|
||||||
|
|
@ -26,7 +26,6 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
||||||
$scope.ES_Enabled = settings.ES_Enabled;
|
$scope.ES_Enabled = settings.ES_Enabled;
|
||||||
$scope.Ping_Enabled = settings.Ping_Enabled;
|
$scope.Ping_Enabled = settings.Ping_Enabled;
|
||||||
$scope.GPS_Enabled = settings.GPS_Enabled;
|
$scope.GPS_Enabled = settings.GPS_Enabled;
|
||||||
$scope.AHRS_Enabled = settings.AHRS_Enabled;
|
|
||||||
$scope.DisplayTrafficSource = settings.DisplayTrafficSource;
|
$scope.DisplayTrafficSource = settings.DisplayTrafficSource;
|
||||||
$scope.DEBUG = settings.DEBUG;
|
$scope.DEBUG = settings.DEBUG;
|
||||||
$scope.ReplayLog = settings.ReplayLog;
|
$scope.ReplayLog = settings.ReplayLog;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
|
||||||
$scope.visible_es = true;
|
$scope.visible_es = true;
|
||||||
}
|
}
|
||||||
$scope.visible_gps = settings.GPS_Enabled;
|
$scope.visible_gps = settings.GPS_Enabled;
|
||||||
$scope.visible_ahrs = settings.AHRS_Enabled;
|
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
// nop
|
// nop
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,6 @@
|
||||||
<ui-switch ng-model='GPS_Enabled' settings-change></ui-switch>
|
<ui-switch ng-model='GPS_Enabled' settings-change></ui-switch>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -214,30 +208,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue