Skip to content

Commit

Permalink
Remove 'AHRS_GDL90_Enabled' option.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Nov 17, 2016
1 parent a473cca commit 6c50a96
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 27 deletions.
2 changes: 0 additions & 2 deletions main/gen_gdl90.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ type settings struct {
OwnshipModeS string
WatchList string
DeveloperMode bool
AHRS_GDL90_Enabled bool
}

type status struct {
Expand Down Expand Up @@ -1066,7 +1065,6 @@ func defaultSettings() {
globalSettings.ReplayLog = false //TODO: 'true' for debug builds.
globalSettings.OwnshipModeS = "F00000"
globalSettings.DeveloperMode = false
globalSettings.AHRS_GDL90_Enabled = false
}

func readSettings() {
Expand Down
2 changes: 0 additions & 2 deletions main/managementinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ func handleSettingsSetRequest(w http.ResponseWriter, r *http.Request) {
globalSettings.GPS_Enabled = val.(bool)
case "AHRS_Enabled":
globalSettings.AHRS_Enabled = val.(bool)
case "AHRS_GDL90_Enabled":
globalSettings.AHRS_GDL90_Enabled = val.(bool)
case "DEBUG":
globalSettings.DEBUG = val.(bool)
case "DisplayTrafficSource":
Expand Down
1 change: 0 additions & 1 deletion main/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ func ffMonitor() {
if strings.HasPrefix(s, "i-want-to-play-ffm-udp") || strings.HasPrefix(s, "i-can-play-ffm-udp") || strings.HasPrefix(s, "i-cannot-play-ffm-udp") {
p.FFCrippled = true
//FIXME: AHRS output doesn't need to be disabled globally, just on the ForeFlight client IPs.
globalSettings.AHRS_GDL90_Enabled = false
if !ff_warned {
e := errors.New("Stratux is not supported by your EFB app. Your EFB app is known to regularly make changes that cause compatibility issues with Stratux. See the README for a list of apps that officially support Stratux.")
addSystemError(e)
Expand Down
18 changes: 4 additions & 14 deletions main/ry835ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -1966,23 +1966,15 @@ func gpsAttitudeSender() {
mySituation.Roll = myGPSPerfStats[index].gpsRoll
mySituation.Gyro_heading = float64(mySituation.TrueCourse)
mySituation.LastAttitudeTime = stratuxClock.Time
//if globalSettings.ForeFlightSimMode == true {
// globalSettings.AHRS_GDL90_Enabled = false // both can't be simultaneously active
// makeFFAHRSSimReport()
//} else if globalSettings.AHRS_GDL90_Enabled == true {
//globalSettings.ForeFlightSimMode = false // both can't be simultaneoussly active
//makeAHRSGDL90Report()
//}

if globalSettings.AHRS_GDL90_Enabled == true {
makeAHRSGDL90Report()
}

makeAHRSGDL90Report()
}
mySituation.mu_GPSPerf.Unlock()
}
}
}
}

func attitudeReaderSender() {
timer := time.NewTicker(100 * time.Millisecond) // ~10Hz update.
for globalStatus.RY835AI_connected && globalSettings.AHRS_Enabled {
Expand All @@ -2007,9 +1999,7 @@ func attitudeReaderSender() {
// if isGPSGroundTrackValid(), etc.

// makeFFAHRSSimReport() // simultaneous use of GDL90 and FFSIM not supported in FF 7.5.1 or later. Function definition will be kept for AHRS debugging and future workarounds.
if globalSettings.AHRS_GDL90_Enabled == true {
makeAHRSGDL90Report()
}
makeAHRSGDL90Report()

mySituation.mu_Attitude.Unlock()
}
Expand Down
3 changes: 1 addition & 2 deletions 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, $location, $window, $http) {

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

var toggles = ['UAT_Enabled', 'ES_Enabled', 'Ping_Enabled', 'GPS_Enabled', 'AHRS_GDL90_Enabled', 'AHRS_Enabled', 'DisplayTrafficSource', 'DEBUG', 'ReplayLog'];
var toggles = ['UAT_Enabled', 'ES_Enabled', 'Ping_Enabled', 'GPS_Enabled', 'AHRS_Enabled', 'DisplayTrafficSource', 'DEBUG', 'ReplayLog'];
var settings = {};
for (i = 0; i < toggles.length; i++) {
settings[toggles[i]] = undefined;
Expand All @@ -27,7 +27,6 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
$scope.Ping_Enabled = settings.Ping_Enabled;
$scope.GPS_Enabled = settings.GPS_Enabled;
$scope.AHRS_Enabled = settings.AHRS_Enabled;
$scope.AHRS_GDL90_Enabled = settings.AHRS_GDL90_Enabled;
$scope.DisplayTrafficSource = settings.DisplayTrafficSource;
$scope.DEBUG = settings.DEBUG;
$scope.ReplayLog = settings.ReplayLog;
Expand Down
6 changes: 0 additions & 6 deletions web/plates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@
<div class="panel panel-default">
<div class="panel-heading">Configuration</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label col-xs-7"><a ui-turn-on="modalAHRSWarning">AHRS Output to EFB</a></label>
<div class="col-xs-5">
<ui-switch ng-model='AHRS_GDL90_Enabled' settings-change ui-turn-on="modalAHRSWarning"></ui-switch>
</div>
</div>
<div class="form-group reset-flow">
<label class="control-label col-xs-5">Mode S Code (Hex)</label>
<form name="modeForm" ng-submit="updatemodes()" novalidate>
Expand Down

0 comments on commit 6c50a96

Please sign in to comment.