From e509c27758a9b5f39d54900c965e7aa62dba61aa Mon Sep 17 00:00:00 2001 From: Petri Mattila Date: Sat, 5 Oct 2024 18:54:02 +0100 Subject: [PATCH] Add min_throttle to MSP_GOVERNOR_PROFILE --- src/main/msp/msp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index f0596b8c1b..f66d35201d 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -1859,6 +1859,7 @@ static bool mspProcessOutCommand(int16_t cmdMSP, sbuf_t *dst) sbufWriteU8(dst, currentPidProfile->governor.cyclic_ff_weight); sbufWriteU8(dst, currentPidProfile->governor.collective_ff_weight); sbufWriteU8(dst, currentPidProfile->governor.max_throttle); + sbufWriteU8(dst, currentPidProfile->governor.min_throttle); break; case MSP_SENSOR_CONFIG: @@ -2617,6 +2618,9 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP, currentPidProfile->governor.cyclic_ff_weight = sbufReadU8(src); currentPidProfile->governor.collective_ff_weight = sbufReadU8(src); currentPidProfile->governor.max_throttle = sbufReadU8(src); + if (sbufBytesRemaining(src) >= 1) { + currentPidProfile->governor.min_throttle = sbufReadU8(src); + } /* Load new values */ governorInitProfile(currentPidProfile); break;