1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

hover point throttle curve adjustment (#14229)

* hover point throttle curve adjustment

* Update src/main/fc/rc.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Update src/main/fc/rc.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Update src/main/fc/rc.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* refactor lookup calculation and move hover to end of controlRateConfig_s struct

* moved sbufReadU8 to the bottom

* added sbufBytesRemaining check

* update controlRateProfile version from 6 to 7

* moved thrHover8 declaration position

* revert variable declaration position change

* fixed tests

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
This commit is contained in:
Marc Frank 2025-04-10 14:39:36 +02:00 committed by GitHub
parent fd3a131797
commit 4ae22e9f8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 60 additions and 10 deletions

View file

@ -1372,7 +1372,10 @@ case MSP_NAME:
// added in 1.43
sbufWriteU8(dst, currentControlRateProfile->rates_type);
// added in 1.47
sbufWriteU8(dst, currentControlRateProfile->thrHover8);
break;
case MSP_PID:
@ -2851,6 +2854,11 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
currentControlRateProfile->rates_type = sbufReadU8(src);
}
// version 1.47
if (sbufBytesRemaining(src) >= 1) {
currentControlRateProfile->thrHover8 = sbufReadU8(src);
}
initRcProcessing();
} else {
return MSP_RESULT_ERROR;