mixer_module/tap_esc: fix usage of constrain() on input

I changed the input constraint in #15349 but screwed up the usage
because I was convinced it's püass by reference. I'll double check
for sure next time.
This commit is contained in:
Matthias Grob
2020-07-20 09:23:42 +02:00
committed by Beat Küng
parent 650b601206
commit 987826f1d4
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -639,12 +639,7 @@ int TAP_ESC::control_callback(uint8_t control_group, uint8_t control_index, floa
input = _controls[control_group].control[control_index];
/* limit control input */
if (input > 1.0f) {
input = 1.0f;
} else if (input < -1.0f) {
input = -1.0f;
}
input = math::constrain(input, -1.f, 1.f);
/* throttle not arming - mark throttle input as invalid */
if (_armed.prearmed && !_armed.armed) {