mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
Finish receiver wizard page
This commit is contained in:
parent
6a514920fa
commit
7e66940d02
3 changed files with 10 additions and 3 deletions
|
@ -70,7 +70,7 @@ var defaultsDialog = (function () {
|
|||
|
||||
privateScope.wizardSettings.push({
|
||||
name: "receiverProtocol",
|
||||
value: $container.find('#wizard-receiver-protocol').val()
|
||||
value: $container.find('#wizard-receiver-protocol option:selected').text()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -3231,7 +3231,7 @@ var mspHelper = (function () {
|
|||
this.encodeSetting(name, value).then(function (data) {
|
||||
return MSP.promise(MSPCodes.MSPV2_SET_SETTING, data).then(callback);
|
||||
}).catch(error => {
|
||||
console.log("Invalid setting: " + name);
|
||||
console.log("Invalid setting: " + name, error);
|
||||
return Promise.resolve().then(callback);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -9,12 +9,19 @@ var wizardSaveFramework = (function () {
|
|||
let self = {};
|
||||
|
||||
self.saveSetting = function (config, callback) {
|
||||
|
||||
/*
|
||||
serialrx_provider to 2
|
||||
serialrx_provider to 6
|
||||
*/
|
||||
|
||||
switch (config.name) {
|
||||
case 'receiverPort':
|
||||
serialPortHelper.set(config.value, 'RX_SERIAL', null);
|
||||
mspHelper.saveSerialPorts(callback);
|
||||
break;
|
||||
case 'receiverProtocol':
|
||||
mspHelper.setSetting('serialrx_provider', config.value, callback);
|
||||
break;
|
||||
default:
|
||||
callback();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue