mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:33:34 +08:00
Ice shedding: always update last ice shedding time
This means that when the feature is enabled in flight, the slew rate is correctly applied assuming that the previous value was 0
This commit is contained in:
@@ -659,6 +659,7 @@ ControlAllocator::get_ice_shedding_output(hrt_abstime now, bool any_upward_motor
|
|||||||
|| max_ice_shedding_slewrate < FLT_EPSILON) {
|
|| max_ice_shedding_slewrate < FLT_EPSILON) {
|
||||||
// The user has not configured the feature to be turned on, or the config makes no sense
|
// The user has not configured the feature to be turned on, or the config makes no sense
|
||||||
_slew_limited_ice_shedding_output = 0.0f;
|
_slew_limited_ice_shedding_output = 0.0f;
|
||||||
|
_last_ice_shedding_update = now;
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -673,6 +674,7 @@ ControlAllocator::get_ice_shedding_output(hrt_abstime now, bool any_upward_motor
|
|||||||
|
|
||||||
if (!apply_shedding) {
|
if (!apply_shedding) {
|
||||||
_slew_limited_ice_shedding_output = 0.0f;
|
_slew_limited_ice_shedding_output = 0.0f;
|
||||||
|
_last_ice_shedding_update = now;
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user