Skip to content

Commit b1f1f3d

Browse files
committed
Fix incorrect send_message parameter in loadLogicConditions
The 5th parameter of MSP.send_message() is protocolVersion (a number), not an error callback. Passing a function caused 'Invalid MSP protocol version' exception which propagated to the isolated context, breaking serial communication until reconnect.
1 parent c9f8d59 commit b1f1f3d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

js/msp/MSPHelper.js

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

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

0 commit comments

Comments
 (0)