From bcba3dfe524533f7b2e39895727455ad2ee40a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 11 Nov 2021 11:06:51 +0100 Subject: [PATCH] control_allocator,angular_velocity_controller: run on rate_ctrl wq --- .../px4_platform_common/px4_work_queue/WorkQueueManager.hpp | 3 +-- .../angular_velocity_controller/AngularVelocityController.cpp | 2 +- src/modules/control_allocator/ControlAllocator.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp b/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp index 3d8fa3be0c..f4c53aa029 100644 --- a/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp +++ b/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp @@ -48,8 +48,7 @@ struct wq_config_t { namespace wq_configurations { -static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1952, 0}; // PX4 inner loop highest priority -static constexpr wq_config_t ctrl_alloc{"wq:ctrl_alloc", 9500, 0}; // PX4 control allocation, same priority as rate_ctrl +static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 3000, 0}; // PX4 inner loop highest priority static constexpr wq_config_t SPI0{"wq:SPI0", 2336, -1}; static constexpr wq_config_t SPI1{"wq:SPI1", 2336, -2}; diff --git a/src/modules/angular_velocity_controller/AngularVelocityController.cpp b/src/modules/angular_velocity_controller/AngularVelocityController.cpp index 8b0faf813b..5f2520e4e0 100644 --- a/src/modules/angular_velocity_controller/AngularVelocityController.cpp +++ b/src/modules/angular_velocity_controller/AngularVelocityController.cpp @@ -44,7 +44,7 @@ using namespace time_literals; AngularVelocityController::AngularVelocityController() : ModuleParams(nullptr), - WorkItem(MODULE_NAME, px4::wq_configurations::ctrl_alloc), + WorkItem(MODULE_NAME, px4::wq_configurations::rate_ctrl), _loop_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")) { _vehicle_status.vehicle_type = vehicle_status_s::VEHICLE_TYPE_ROTARY_WING; diff --git a/src/modules/control_allocator/ControlAllocator.cpp b/src/modules/control_allocator/ControlAllocator.cpp index 9f8bebd087..4420d4f496 100644 --- a/src/modules/control_allocator/ControlAllocator.cpp +++ b/src/modules/control_allocator/ControlAllocator.cpp @@ -51,7 +51,7 @@ using namespace time_literals; ControlAllocator::ControlAllocator() : ModuleParams(nullptr), - WorkItem(MODULE_NAME, px4::wq_configurations::ctrl_alloc), + WorkItem(MODULE_NAME, px4::wq_configurations::rate_ctrl), _loop_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")) { parameters_updated();