mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-14 17:11:36 +08:00
commander: remove low priority thread, run tasks in a worker thread on demand
- removes race conditions - removes dependencies on static data & methods - reduces RAM usage by ~3.8KB
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "Arming/PreFlightCheck/PreFlightCheck.hpp"
|
||||
#include "failure_detector/FailureDetector.hpp"
|
||||
#include "state_machine_helper.h"
|
||||
#include "worker_thread.hpp"
|
||||
|
||||
#include <lib/controllib/blocks.hpp>
|
||||
#include <lib/hysteresis/hysteresis.h>
|
||||
@@ -382,6 +383,8 @@ private:
|
||||
safety_s _safety{};
|
||||
vtol_vehicle_status_s _vtol_status{};
|
||||
|
||||
WorkerThread _worker_thread;
|
||||
|
||||
// Subscriptions
|
||||
uORB::Subscription _actuator_controls_sub{ORB_ID_VEHICLE_ATTITUDE_CONTROLS};
|
||||
uORB::Subscription _cmd_sub {ORB_ID(vehicle_command)};
|
||||
|
||||
Reference in New Issue
Block a user