mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
RXFAIL send method that allows more future RX channels
- Fixed the bug found by Nighthawk32 - Correction for camelCase - Some bugfixes
This commit is contained in:
parent
31fa4bfaa2
commit
1a0c6735a9
3 changed files with 68 additions and 32 deletions
|
@ -676,7 +676,6 @@ function configuration_restore(callback) {
|
|||
if (semver.gte(CONFIG.apiVersion, "1.15.0")) {
|
||||
uniqueData.push(MSP_codes.MSP_SET_RX_CONFIG);
|
||||
uniqueData.push(MSP_codes.MSP_SET_FAILSAFE_CONFIG);
|
||||
uniqueData.push(MSP_codes.MSP_SET_RXFAIL_CONFIG);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -701,7 +700,7 @@ function configuration_restore(callback) {
|
|||
send_unique_data_item();
|
||||
});
|
||||
} else {
|
||||
MSP.send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, send_led_strip_config);
|
||||
send_led_strip_config();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -714,9 +713,21 @@ function configuration_restore(callback) {
|
|||
}
|
||||
|
||||
function send_led_strip_config() {
|
||||
MSP.sendLedStripConfig(reboot);
|
||||
MSP.sendLedStripConfig(send_rxfail_config);
|
||||
}
|
||||
|
||||
function send_rxfail_config() {
|
||||
if (semver.gte(CONFIG.apiVersion, "1.15.0")) {
|
||||
MSP.sendRxFailConfig(save_to_eeprom);
|
||||
} else {
|
||||
save_to_eeprom();
|
||||
}
|
||||
}
|
||||
|
||||
function save_to_eeprom() {
|
||||
MSP.send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, reboot);
|
||||
}
|
||||
|
||||
function reboot() {
|
||||
GUI.log(chrome.i18n.getMessage('eeprom_saved_ok'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue