From 4fa13c242201b2f26053e2cd7992f2bf7bceaefc Mon Sep 17 00:00:00 2001 From: Balduin Date: Thu, 22 Jan 2026 12:03:21 +0100 Subject: [PATCH] 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 --- src/modules/control_allocator/ControlAllocator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/control_allocator/ControlAllocator.cpp b/src/modules/control_allocator/ControlAllocator.cpp index 400bba28dd..20aca874a4 100644 --- a/src/modules/control_allocator/ControlAllocator.cpp +++ b/src/modules/control_allocator/ControlAllocator.cpp @@ -659,6 +659,7 @@ ControlAllocator::get_ice_shedding_output(hrt_abstime now, bool any_upward_motor || max_ice_shedding_slewrate < FLT_EPSILON) { // The user has not configured the feature to be turned on, or the config makes no sense _slew_limited_ice_shedding_output = 0.0f; + _last_ice_shedding_update = now; return 0.0f; } @@ -673,6 +674,7 @@ ControlAllocator::get_ice_shedding_output(hrt_abstime now, bool any_upward_motor if (!apply_shedding) { _slew_limited_ice_shedding_output = 0.0f; + _last_ice_shedding_update = now; return 0.0f; }