|
|
|
@ -244,13 +244,13 @@ void AP_Motors::slow_start(bool true_false)
@@ -244,13 +244,13 @@ void AP_Motors::slow_start(bool true_false)
|
|
|
|
|
void AP_Motors::update_throttle_filter() |
|
|
|
|
{ |
|
|
|
|
if (armed()) { |
|
|
|
|
_throttle_filter.apply(constrain_float(_throttle_in,-100,1100), 1.0f/_loop_rate); |
|
|
|
|
_throttle_filter.apply(_throttle_in, 1.0f/_loop_rate); |
|
|
|
|
} else { |
|
|
|
|
_throttle_filter.reset(0.0f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// prevent _throttle_control_input from wrapping at int16 max or min
|
|
|
|
|
_throttle_control_input = constrain_float(_throttle_filter.get(),-32000,32000); |
|
|
|
|
// constrain throttle signal to 0-1000
|
|
|
|
|
_throttle_control_input = constrain_float(_throttle_filter.get(),0.0f,1000.0f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// update_max_throttle - updates the limits on _max_throttle if necessary taking into account slow_start_throttle flag
|
|
|
|
|