1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 17:55:30 +03:00

Fix OSD throttle position element calculation and add 3D support

Previously the Throttle Position element calculation was based solely on the raw rcCommand value and didn't take into account the min_check deadzone so the resulting displayed percentage was incorrect. Also 3D trottle handling was not considered.

Corrected the calculation and added support for 3D throttle modes. Reversed thrust will be represented with negative throttle percentages.
This commit is contained in:
Bruce Luckcuck 2018-12-08 12:58:06 -05:00
parent 586eef94e5
commit 5ed1bbb2a9
4 changed files with 26 additions and 15 deletions

View file

@ -68,7 +68,8 @@ void updateArmingStatus(void);
void taskMainPidLoop(timeUs_t currentTimeUs);
bool isFlipOverAfterCrashActive(void);
int8_t calculateThrottlePercent(void);
uint8_t calculateThrottlePercentAbs(void);
void runawayTakeoffTemporaryDisable(uint8_t disableFlag);
bool isAirmodeActivated();
timeUs_t getLastDisarmTimeUs(void);
@ -78,4 +79,3 @@ void resetTryingToArm();
void subTaskTelemetryPollSensors(timeUs_t currentTimeUs);
bool isLaunchControlActive(void);