mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-19 14:25:13 +03:00
Store GPS protocol in the wizard state
This commit is contained in:
parent
7b63e06521
commit
a90d4634d5
2 changed files with 10 additions and 17 deletions
|
@ -79,23 +79,16 @@ var defaultsDialog = (function () {
|
||||||
|
|
||||||
privateScope.wizardSettings.push({
|
privateScope.wizardSettings.push({
|
||||||
name: "gpsPort",
|
name: "gpsPort",
|
||||||
value: port
|
value: {
|
||||||
});
|
port: port,
|
||||||
|
baud: baud
|
||||||
privateScope.wizardSettings.push({
|
}
|
||||||
name: "gpsBaud",
|
|
||||||
value: baud
|
|
||||||
});
|
});
|
||||||
|
|
||||||
privateScope.wizardSettings.push({
|
privateScope.wizardSettings.push({
|
||||||
name: "gpsProtocol",
|
name: "gpsProtocol",
|
||||||
value: protocol
|
value: protocol
|
||||||
});
|
});
|
||||||
|
|
||||||
// privateScope.wizardSettings.push({
|
|
||||||
// });
|
|
||||||
|
|
||||||
// let gpsBit = FC.getFeatures().find( feature => feature.name === 'GPS' ).bit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
privateScope.wizard(selectedDefaultPreset, wizardStep + 1);
|
privateScope.wizard(selectedDefaultPreset, wizardStep + 1);
|
||||||
|
|
|
@ -23,19 +23,19 @@ var wizardSaveFramework = (function () {
|
||||||
|
|
||||||
let gpsBit = FC.getFeatures().find( feature => feature.name === 'GPS' ).bit;
|
let gpsBit = FC.getFeatures().find( feature => feature.name === 'GPS' ).bit;
|
||||||
|
|
||||||
if (config.value == '-1') {
|
if (config.value.port == '-1') {
|
||||||
features.unset(gpsBit);
|
features.unset(gpsBit);
|
||||||
} else {
|
} else {
|
||||||
features.set(gpsBit);
|
features.set(gpsBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
features.execute(callback);
|
serialPortHelper.set(config.value.port, 'GPS', config.value.baud);
|
||||||
break;
|
mspHelper.saveSerialPorts(function () {
|
||||||
case 'gpsBaud':
|
features.execute(callback);
|
||||||
console.log(config);
|
});
|
||||||
break;
|
break;
|
||||||
case 'gpsProtocol':
|
case 'gpsProtocol':
|
||||||
console.log(config);
|
mspHelper.setSetting('gps_provider', config.value, callback);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
callback();
|
callback();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue