mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 17:23:33 +08:00
commander/manual_control: use msg enum for params
Instead of using a private enum class we should define the enum in the vehicle_command message and then use it consistently.
This commit is contained in:
committed by
Matthias Grob
parent
f1b1068824
commit
b3a5072de5
@@ -116,23 +116,11 @@ public:
|
||||
private:
|
||||
static constexpr int MAX_MANUAL_INPUT_COUNT = 3;
|
||||
|
||||
enum class ArmingAction {
|
||||
TOGGLE = -1,
|
||||
DISARM = 0,
|
||||
ARM = 1,
|
||||
};
|
||||
|
||||
enum class ArmingOrigin {
|
||||
GESTURE = 1,
|
||||
SWITCH = 2,
|
||||
BUTTON = 3,
|
||||
};
|
||||
|
||||
void Run() override;
|
||||
|
||||
void evaluate_mode_slot(uint8_t mode_slot);
|
||||
void send_mode_command(int32_t commander_main_state);
|
||||
void send_arm_command(ArmingAction action, ArmingOrigin origin);
|
||||
void send_arm_command(int8_t action, int8_t origin);
|
||||
void send_rtl_command();
|
||||
void send_loiter_command();
|
||||
void send_offboard_command();
|
||||
|
||||
Reference in New Issue
Block a user