Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RC calibration with inverted throttle #21576

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/modules/rc_update/rc_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ void RCUpdate::parameters_updated()
const uint16_t throttle_min = _parameters.min[throttle_channel];
const uint16_t throttle_trim = _parameters.trim[throttle_channel];
const uint16_t throttle_max = _parameters.max[throttle_channel];
const uint16_t throttle_rev = _parameters.rev[throttle_channel];

if (throttle_min == throttle_trim) {
if (throttle_min == throttle_trim || (throttle_rev && throttle_max == throttle_trim)) {
const uint16_t new_throttle_trim = (throttle_min + throttle_max) / 2;
_parameters.trim[throttle_channel] = new_throttle_trim;
}
Expand Down