We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents be88b5a + 376bd57 commit ab4b758Copy full SHA for ab4b758
js/msp/MSPHelper.js
@@ -79,10 +79,14 @@ var mspHelper = (function (gui) {
79
profile_byte = data.getUint8(offset++)
80
CONFIG.profile = profile_byte & 0x0F;
81
CONFIG.battery_profile = (profile_byte & 0xF0) >> 4;
82
- profile_byte = data.getUint8(offset++)
83
- CONFIG.mixer_profile = profile_byte & 0x0F;
84
CONFIG.armingFlags = data.getUint32(offset, true);
85
offset += 4;
+
+ //As there are 8 bytes for mspBoxModeFlags (number of bytes is actually variable)
86
+ //read mixer profile as the last byte in the the message
87
+ profile_byte = data.getUint8(dataHandler.message_length_expected - 1);
88
+ CONFIG.mixer_profile = profile_byte & 0x0F;
89
90
gui.updateStatusBar();
91
gui.updateProfileChange();
92
break;
0 commit comments