«flighttermination state» replaced by more general «failsafe state»

This commit is contained in:
Anton Babushkin
2014-01-25 23:24:12 +01:00
parent e8a1b620e9
commit ebc7cb03b7
7 changed files with 206 additions and 164 deletions
@@ -92,7 +92,7 @@ struct vehicle_control_mode_s
bool flag_control_position_enabled; /**< true if position is controlled */
bool flag_control_altitude_enabled; /**< true if altitude is controlled */
bool flag_control_climb_rate_enabled; /**< true if climb rate is controlled */
bool flag_control_flighttermination_enabled; /**< true if flighttermination is enabled */
bool flag_control_termination_enabled; /**< true if flighttermination is enabled */
};
/**
+6 -5
View File
@@ -82,9 +82,11 @@ typedef enum {
} hil_state_t;
typedef enum {
FLIGHTTERMINATION_STATE_OFF = 0,
FLIGHTTERMINATION_STATE_ON
} flighttermination_state_t;
FAILSAFE_STATE_NORMAL = 0,
FAILSAFE_STATE_RTL,
FAILSAFE_STATE_TERMINATION,
FAILSAFE_STATE_MAX
} failsafe_state_t;
typedef enum {
MODE_SWITCH_MANUAL = 0,
@@ -173,6 +175,7 @@ struct vehicle_status_s
uint64_t set_nav_state_timestamp; /**< timestamp of latest change of set_nav_state */
arming_state_t arming_state; /**< current arming state */
hil_state_t hil_state; /**< current hil state */
failsafe_state_t failsafe_state; /**< current failsafe state */
int32_t system_type; /**< system type, inspired by MAVLink's VEHICLE_TYPE enum */
int32_t system_id; /**< system id, inspired by MAVLink's system ID field */
@@ -223,8 +226,6 @@ struct vehicle_status_s
uint16_t errors_count2;
uint16_t errors_count3;
uint16_t errors_count4;
flighttermination_state_t flighttermination_state;
};
/**