refactor(control_allocator): remove different timeouts again

in the name of simplicity, have one hardcoded timeout. Options to
address actuators that need more time:

 - repeatedly send the command from the GS
 - use another param in the {MAV/VEHICLE}_CMD to specify the duration,
   expose also in commander interface, take default if not given
This commit is contained in:
Balduin
2026-05-06 18:33:56 +02:00
parent 44e87f54b6
commit 5b07e0aa2f
2 changed files with 2 additions and 6 deletions
@@ -164,9 +164,7 @@ void ActuatorGroupPreflightCheck::updateState(hrt_abstime now)
}
}
const hrt_abstime duration = isThrust(_group) ? PREFLIGHT_CHECK_DURATION_THRUST : PREFLIGHT_CHECK_DURATION_SERVOS;
if (now - _started >= duration) {
if (now - _started >= PREFLIGHT_CHECK_DURATION) {
_running = false;
sendAck(_last_command, vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED, now);
}
@@ -81,9 +81,7 @@ public:
ActuatorEffectiveness &effectiveness);
private:
static constexpr hrt_abstime PREFLIGHT_CHECK_DURATION_SERVOS = 500'000; // 500 ms
// A bit longer since FW forward thrust can have significant slew rate
static constexpr hrt_abstime PREFLIGHT_CHECK_DURATION_THRUST = 2'000'000; // 2 s
static constexpr hrt_abstime PREFLIGHT_CHECK_DURATION = 500'000; // 500 ms
static bool isThrust(uint8_t group);
static bool isKnownGroup(uint8_t group);