Skip to content

Commit 5bf903c

Browse files
Merge pull request #2495 from sensei-hacker/fix-logic-conditions-loading-error-handler
Fix logic conditions loading to handle MSP errors
2 parents 6cce81e + 212917f commit 5bf903c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

js/msp/MSPHelper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,10 +2495,12 @@ var mspHelper = (function () {
24952495

24962496
if (isConfigured) {
24972497
// Fetch from firmware - handler will put() it
2498-
MSP.send_message(MSPCodes.MSP2_INAV_LOGIC_CONDITIONS_SINGLE, [idx], false, function() {
2498+
// Use same callback for success and error to ensure loading continues
2499+
const onComplete = function() {
24992500
idx++;
25002501
processNextCondition();
2501-
});
2502+
};
2503+
MSP.send_message(MSPCodes.MSP2_INAV_LOGIC_CONDITIONS_SINGLE, [idx], false, onComplete, onComplete);
25022504
return; // Wait for async MSP response
25032505
} else {
25042506
// Not configured - put default directly and continue loop

0 commit comments

Comments
 (0)