refactor(control_allocator): reorder inequality to avoid uint wrapping

and add unit to variable name
This commit is contained in:
Balduin
2026-05-07 11:46:43 +02:00
parent dc68e38a61
commit 8bc5e3bd7f
2 changed files with 2 additions and 2 deletions
@@ -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);
}
@@ -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);