Skip to content

Commit

Permalink
Merge pull request #2240 from iNavFlight/MrD_Enable-virtual-pitot-of-…
Browse files Browse the repository at this point in the history
…GPS-seupt-in-wizard

Enable virtual pitot when a GNSS module is setup in the wizard
  • Loading branch information
b14ckyy authored Nov 15, 2024
2 parents 1a96fdc + 16a0bf9 commit 1a291dc
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 1a291dc

Please sign in to comment.