mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Fix initialization of build options when MSP timeout occurs (#4400)
* Fix init in case of timeout * Experiment * Remove experiment * Move processing * Tidy up
This commit is contained in:
parent
cdd721de34
commit
96a82d77f0
2 changed files with 9 additions and 9 deletions
|
@ -824,11 +824,13 @@ MspHelper.prototype.process_data = function (dataHandler) {
|
|||
console.log("Fw git rev:", FC.CONFIG.gitRevision);
|
||||
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
|
||||
let option = data.readU16();
|
||||
while (option) {
|
||||
FC.CONFIG.buildOptions = [];
|
||||
let option;
|
||||
while ((option = data.readU16())) {
|
||||
FC.CONFIG.buildOptions.push(option);
|
||||
option = data.readU16();
|
||||
}
|
||||
// Humanize the build options
|
||||
FC.processBuildOptions();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -323,11 +323,6 @@ function onOpen(openInfo) {
|
|||
MSP.send_message(MSPCodes.MSP_BUILD_INFO, false, false, function () {
|
||||
gui_log(i18n.getMessage("buildInfoReceived", [FC.CONFIG.buildInfo]));
|
||||
|
||||
// retrieve build options from the flight controller
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
|
||||
FC.processBuildOptions();
|
||||
}
|
||||
|
||||
MSP.send_message(MSPCodes.MSP_BOARD_INFO, false, false, processBoardInfo);
|
||||
});
|
||||
});
|
||||
|
@ -634,7 +629,10 @@ function connectCli() {
|
|||
}
|
||||
|
||||
function onConnect() {
|
||||
if ($("a.firmware_flasher_button__label").hasClass("active") || $("a.firmware_flasher_button__link").hasClass("active")) {
|
||||
if (
|
||||
$("a.firmware_flasher_button__label").hasClass("active") ||
|
||||
$("a.firmware_flasher_button__link").hasClass("active")
|
||||
) {
|
||||
$("a.firmware_flasher_button__label").removeClass("active");
|
||||
$("a.firmware_flasher_button__link").removeClass("active");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue