mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-25 18:18:49 -04:00
Plane: save a byte in auto_state
keep single bits together to save space on APM2
This commit is contained in:
parent
01f611daa9
commit
959cd11cb1
@ -531,6 +531,9 @@ static struct {
|
|||||||
// have we checked for an auto-land?
|
// have we checked for an auto-land?
|
||||||
bool checked_for_autoland:1;
|
bool checked_for_autoland:1;
|
||||||
|
|
||||||
|
// denotes if a go-around has been commanded for landing
|
||||||
|
bool commanded_go_around:1;
|
||||||
|
|
||||||
// Altitude threshold to complete a takeoff command in autonomous modes. Centimeters
|
// Altitude threshold to complete a takeoff command in autonomous modes. Centimeters
|
||||||
int32_t takeoff_altitude_cm;
|
int32_t takeoff_altitude_cm;
|
||||||
|
|
||||||
@ -552,10 +555,6 @@ static struct {
|
|||||||
|
|
||||||
// time when we first pass min GPS speed on takeoff
|
// time when we first pass min GPS speed on takeoff
|
||||||
uint32_t takeoff_speed_time_ms;
|
uint32_t takeoff_speed_time_ms;
|
||||||
|
|
||||||
// denotes if a go-around has been commanded for landing
|
|
||||||
bool commanded_go_around;
|
|
||||||
|
|
||||||
} auto_state = {
|
} auto_state = {
|
||||||
takeoff_complete : true,
|
takeoff_complete : true,
|
||||||
land_complete : false,
|
land_complete : false,
|
||||||
@ -564,14 +563,14 @@ static struct {
|
|||||||
no_crosstrack : true,
|
no_crosstrack : true,
|
||||||
fbwa_tdrag_takeoff_mode : false,
|
fbwa_tdrag_takeoff_mode : false,
|
||||||
checked_for_autoland : false,
|
checked_for_autoland : false,
|
||||||
|
commanded_go_around : false,
|
||||||
takeoff_altitude_cm : 0,
|
takeoff_altitude_cm : 0,
|
||||||
takeoff_pitch_cd : 0,
|
takeoff_pitch_cd : 0,
|
||||||
highest_airspeed : 0,
|
highest_airspeed : 0,
|
||||||
initial_pitch_cd : 0,
|
initial_pitch_cd : 0,
|
||||||
next_turn_angle : 90.0f,
|
next_turn_angle : 90.0f,
|
||||||
land_sink_rate : 0,
|
land_sink_rate : 0,
|
||||||
takeoff_speed_time_ms : 0,
|
takeoff_speed_time_ms : 0
|
||||||
commanded_go_around : false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// true if we are in an auto-throttle mode, which means
|
// true if we are in an auto-throttle mode, which means
|
||||||
|
Loading…
Reference in New Issue
Block a user