1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 16:25:19 +03:00

Correctly set GPS feature flag

This commit is contained in:
Pawel Spychalski (DzikuVx) 2024-06-17 14:12:59 +02:00
parent 5c7a6be54e
commit 7b63e06521
2 changed files with 4 additions and 5 deletions

View file

@ -112,6 +112,7 @@ var defaultsDialog = (function () {
$container.hide();
wizardSaveFramework.persist(privateScope.wizardSettings, function () {
//FIXME this has to be enabled when the settings are saved
// mspHelper.saveToEeprom(function () {
// //noinspection JSUnresolvedVariable
// GUI.log(i18n.getMessage('configurationEepromSaved'));
@ -376,6 +377,7 @@ var defaultsDialog = (function () {
privateScope.onInitSettingReturned = function (promise) {
//FIXME: This is a workaround to avoid applying defaults when the settings are already applied
// if (promise.value > 0) {
// return; //Defaults were applied, we can just ignore
// }

View file

@ -20,19 +20,16 @@ var wizardSaveFramework = (function () {
mspHelper.setSetting('serialrx_provider', config.value, callback);
break;
case 'gpsPort':
console.log(config);
let gpsBit = FC.getFeatures().find( feature => feature.name === 'GPS' ).bit;
if (config.value == '-1') {
features.unset(gpsBit);
console.log('Unset GPS');
} else {
features.set(gpsBit);
console.log('Set GPS');
}
features.execute(callback);
break;
case 'gpsBaud':
console.log(config);