1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2024-05-17 11:04:18 +02:00
parent 6a514920fa
commit 7e66940d02
3 changed files with 10 additions and 3 deletions

View file

@ -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()
});
}

View file

@ -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);
});
};

View file

@ -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;