Skip to content

Commit

Permalink
Enable virtual pitot when a GNSS module is setup in the wizard
Browse files Browse the repository at this point in the history
Fixes #2231
  • Loading branch information
MrD-RC committed Nov 10, 2024
1 parent d48adce commit 16a0bf9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/wizard_save_framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var wizardSaveFramework = (function () {

serialPortHelper.set(config.value.port, 'GPS', config.value.baud);
mspHelper.saveSerialPorts(function () {
features.execute(callback);
features.execute(self.enableVirtulaPitot(config, callback));
});
break;
case 'gpsProtocol':
Expand All @@ -43,6 +43,14 @@ var wizardSaveFramework = (function () {
}
};

self.enableVirtulaPitot = function (config, callback) {
if (config.value.port != '-1') {
mspHelper.setSetting('pitot_hardware', "VIRTUAL", callback);
} else {
callback();
}
};

self.handleSetting = function (configs, finalCallback) {

if (configs.length > 0) {
Expand Down

0 comments on commit 16a0bf9

Please sign in to comment.