diff --git a/src/modules/control_allocator/ActuatorGroupPreflightCheck.cpp b/src/modules/control_allocator/ActuatorGroupPreflightCheck.cpp index cb666647aa..23299d55d6 100644 --- a/src/modules/control_allocator/ActuatorGroupPreflightCheck.cpp +++ b/src/modules/control_allocator/ActuatorGroupPreflightCheck.cpp @@ -168,7 +168,7 @@ void ActuatorGroupPreflightCheck::updateState(hrt_abstime now) } } - if (now - _started >= PREFLIGHT_CHECK_DURATION) { + if (now >= _started + PREFLIGHT_CHECK_DURATION_US) { _running = false; sendAck(_last_command, vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED, now); } diff --git a/src/modules/control_allocator/ActuatorGroupPreflightCheck.hpp b/src/modules/control_allocator/ActuatorGroupPreflightCheck.hpp index ba16d9c798..4a64b2cde4 100644 --- a/src/modules/control_allocator/ActuatorGroupPreflightCheck.hpp +++ b/src/modules/control_allocator/ActuatorGroupPreflightCheck.hpp @@ -84,7 +84,7 @@ public: ActuatorEffectiveness &effectiveness); private: - static constexpr hrt_abstime PREFLIGHT_CHECK_DURATION = 500'000; // 500 ms + static constexpr hrt_abstime PREFLIGHT_CHECK_DURATION_US = 500'000; // 500 ms static bool isThrust(uint8_t group); static bool isKnownGroup(uint8_t group);