1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Merge pull request #7593 from dthubereng/mode_range_extras_link_permanentid

Fix MSP_MODE_RANGES_EXTRA link to permanentId
This commit is contained in:
Michael Keller 2019-02-19 01:58:06 +13:00 committed by GitHub
commit 839d4072b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1037,9 +1037,10 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
for (int i = 0; i < MAX_MODE_ACTIVATION_CONDITION_COUNT; i++) {
const modeActivationCondition_t *mac = modeActivationConditions(i);
const box_t *box = findBoxByBoxId(mac->modeId);
const box_t *linkedBox = findBoxByBoxId(mac->linkedTo);
sbufWriteU8(dst, box->permanentId); // each element is aligned with MODE_RANGES by the permanentId
sbufWriteU8(dst, mac->modeLogic);
sbufWriteU8(dst, mac->linkedTo);
sbufWriteU8(dst, linkedBox->permanentId);
}
break;