cs_check: move constants to header file

This commit is contained in:
Balduin 2025-07-14 09:48:06 +02:00
parent 25539fc419
commit c75ea70f3e
2 changed files with 4 additions and 3 deletions

View File

@ -555,9 +555,6 @@ void ControlAllocator::preflight_check_finish()
void ControlAllocator::preflight_check_update_state()
{
static uint32_t PREFLIGHT_CHECK_DURATION = 500_ms;
static uint32_t PREFLIGHT_CHECK_ACK_PERIOD = 1000_ms;
if (_preflight_check_running) {
hrt_abstime now = hrt_absolute_time();

View File

@ -81,6 +81,7 @@
#include <uORB/topics/vehicle_command_ack.h>
#include <uORB/topics/failure_detector_status.h>
class ControlAllocator : public ModuleBase<ControlAllocator>, public ModuleParams, public px4::ScheduledWorkItem
{
public:
@ -90,6 +91,9 @@ public:
static constexpr int MAX_NUM_MOTORS = actuator_motors_s::NUM_CONTROLS;
static constexpr int MAX_NUM_SERVOS = actuator_servos_s::NUM_CONTROLS;
static constexpr uint32_t PREFLIGHT_CHECK_DURATION = 500_ms;
static constexpr uint32_t PREFLIGHT_CHECK_ACK_PERIOD = 1000_ms;
using ActuatorVector = ActuatorEffectiveness::ActuatorVector;
ControlAllocator();