From 3d1dee80091350d40637ab99cfa5b8bd24c9572b Mon Sep 17 00:00:00 2001 From: Dave Huber Date: Sun, 17 Feb 2019 00:34:11 -0600 Subject: [PATCH] Fix MSP_MODE_RANGES_EXTRA link to permanentId --- src/main/msp/msp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index 3b004fd06..f3cfc6002 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -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;