mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 06:01:35 +08:00
Reworking control infrastructure for inner rate loop, preparing offboard interface
This commit is contained in:
@@ -50,14 +50,14 @@
|
||||
|
||||
struct ardrone_motors_setpoint_s
|
||||
{
|
||||
uint16_t counter; //incremented by the writing thread everytime new data is stored
|
||||
uint64_t timestamp; //in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
uint16_t motor_front_nw; ///< Front motor in + configuration, front left motor in x configuration
|
||||
uint16_t motor_right_ne; ///< Right motor in + configuration, front right motor in x configuration
|
||||
uint16_t motor_back_se; ///< Back motor in + configuration, back right motor in x configuration
|
||||
uint16_t motor_left_sw; ///< Left motor in + configuration, back left motor in x configuration
|
||||
|
||||
uint8_t group; /**< quadrotor group */
|
||||
uint8_t mode; /**< requested flight mode XXX define */
|
||||
float p1; /**< parameter 1: rate control: roll rate, att control: roll angle (in radians, NED) */
|
||||
float p2; /**< parameter 2: rate control: pitch rate, att control: pitch angle (in radians, NED) */
|
||||
float p3; /**< parameter 3: rate control: yaw rate, att control: yaw angle (in radians, NED) */
|
||||
float p4; /**< parameter 4: thrust, [0..1] */
|
||||
}; /**< AR.Drone low level motors */
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,23 +111,24 @@ struct vehicle_status_s
|
||||
uint16_t counter; /**< incremented by the writing thread everytime new data is stored */
|
||||
uint64_t timestamp; /**< in microseconds since system start, is set whenever the writing thread stores new data */
|
||||
|
||||
commander_state_machine_t state_machine; /**< Current flight state, main state machine */
|
||||
enum VEHICLE_FLIGHT_MODE flight_mode; /**< Current flight mode, as defined by mode switch */
|
||||
enum VEHICLE_ATTITUDE_MODE attitute_mode; /**< Current attitude control mode, as defined by VEHICLE_ATTITUDE_MODE enum */
|
||||
commander_state_machine_t state_machine; /**< current flight state, main state machine */
|
||||
enum VEHICLE_FLIGHT_MODE flight_mode; /**< current flight mode, as defined by mode switch */
|
||||
enum VEHICLE_ATTITUDE_MODE attitute_mode; /**< current attitude control mode, as defined by VEHICLE_ATTITUDE_MODE enum */
|
||||
|
||||
// uint8_t mode;
|
||||
|
||||
|
||||
/* system flags - these represent the state predicates */
|
||||
|
||||
bool flag_system_armed; /**< True is motors / actuators are armed */
|
||||
bool flag_system_armed; /**< true is motors / actuators are armed */
|
||||
bool flag_control_manual_enabled; /**< true if manual input is mixed in */
|
||||
bool flag_hil_enabled; /**< True if hardware in the loop simulation is enabled */
|
||||
bool flag_control_offboard_enabled; /**< true if offboard control input is on */
|
||||
bool flag_hil_enabled; /**< true if hardware in the loop simulation is enabled */
|
||||
|
||||
// bool flag_control_rates_enabled; /**< true if rates are stabilized */
|
||||
// bool flag_control_attitude_enabled; *< true if attitude stabilization is mixed in
|
||||
// bool control_speed_enabled; /**< true if speed (implies direction) is controlled */
|
||||
// bool control_position_enabled; /**< true if position is controlled */
|
||||
bool flag_control_rates_enabled; /**< true if rates are stabilized */
|
||||
bool flag_control_attitude_enabled; /**< true if attitude stabilization is mixed in */
|
||||
bool flag_control_speed_enabled; /**< true if speed (implies direction) is controlled */
|
||||
bool flag_control_position_enabled; /**< true if position is controlled */
|
||||
|
||||
bool flag_preflight_gyro_calibration; /**< true if gyro calibration is requested */
|
||||
bool flag_preflight_mag_calibration; /**< true if mag calibration is requested */
|
||||
|
||||
Reference in New Issue
Block a user