mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
commander: remove calibration_enabled
This flag is not used anywhere, it therefore doesn't need to be in vehicle_status.
This commit is contained in:
parent
fe85841a1d
commit
181eb49da8
@ -65,7 +65,6 @@ uint8 nav_state # set navigation state machine to specified value
|
||||
uint8 arming_state # current arming state
|
||||
uint8 hil_state # current hil state
|
||||
bool failsafe # true if system is in failsafe state
|
||||
bool calibration_enabled # true if current calibrating parts of the system. Also sets the system to ARMING_STATE_INIT.
|
||||
|
||||
uint8 system_type # system type, contains mavlink MAV_TYPE
|
||||
uint32 system_id # system id, contains MAVLink's system ID field
|
||||
|
||||
@ -225,6 +225,8 @@ static bool circuit_breaker_engaged_enginefailure_check;
|
||||
static bool circuit_breaker_engaged_gpsfailure_check;
|
||||
static bool cb_usb;
|
||||
|
||||
static bool calibration_enabled = false;
|
||||
|
||||
/**
|
||||
* The daemon app only briefly exists to start
|
||||
* the background job. The stack size assigned in the
|
||||
@ -2047,7 +2049,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* If in INIT state, try to proceed to STANDBY state */
|
||||
if (!status.calibration_enabled && status.arming_state == vehicle_status_s::ARMING_STATE_INIT) {
|
||||
if (!calibration_enabled && status.arming_state == vehicle_status_s::ARMING_STATE_INIT) {
|
||||
arming_ret = arming_state_transition(&status,
|
||||
&safety,
|
||||
vehicle_status_s::ARMING_STATE_STANDBY,
|
||||
@ -3548,7 +3550,7 @@ void *commander_low_prio_loop(void *arg)
|
||||
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_DENIED, command_ack_pub, command_ack);
|
||||
break;
|
||||
} else {
|
||||
status.calibration_enabled = true;
|
||||
calibration_enabled = true;
|
||||
}
|
||||
|
||||
if ((int)(cmd.param1) == 1) {
|
||||
@ -3609,7 +3611,7 @@ void *commander_low_prio_loop(void *arg)
|
||||
calib_ret = OK;
|
||||
}
|
||||
|
||||
status.calibration_enabled = false;
|
||||
calibration_enabled = false;
|
||||
|
||||
if (calib_ret == OK) {
|
||||
tune_positive(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user