Copter: rename armed_with_switch to armed_with_airmode_switch

This commit is contained in:
Iampete1 2021-09-14 01:08:28 +01:00 committed by Andrew Tridgell
parent 1eb26c83e2
commit 456d57c28f
3 changed files with 3 additions and 3 deletions

View File

@ -857,7 +857,7 @@ bool AP_Arming_Copter::arm(const AP_Arming::Method method, const bool do_arming_
copter.ap.in_arming_delay = true;
// assumed armed without a arming, switch. Overridden in switches.cpp
copter.ap.armed_with_switch = false;
copter.ap.armed_with_airmode_switch = false;
// return success
return true;

View File

@ -364,7 +364,7 @@ private:
uint8_t initialised_params : 1; // 24 // true when the all parameters have been initialised. we cannot send parameters to the GCS until this is done
uint8_t unused3 : 1; // 25 // was compass_init_location; true when the compass's initial location has been set
uint8_t unused2 : 1; // 26 // aux switch rc_override is allowed
uint8_t armed_with_switch : 1; // 27 // we armed using a arming switch
uint8_t armed_with_airmode_switch : 1; // 27 // we armed using a arming switch
};
uint32_t value;
} ap_t;

View File

@ -180,7 +180,7 @@ void Copter::set_throttle_zero_flag(int16_t throttle_control)
// and we are flying. Immediately set as non-zero
if ((!ap.using_interlock && (throttle_control > 0) && !SRV_Channels::get_emergency_stop()) ||
(ap.using_interlock && motors->get_interlock()) ||
ap.armed_with_switch || air_mode == AirMode::AIRMODE_ENABLED) {
ap.armed_with_airmode_switch || air_mode == AirMode::AIRMODE_ENABLED) {
last_nonzero_throttle_ms = tnow_ms;
ap.throttle_zero = false;
} else if (tnow_ms - last_nonzero_throttle_ms > THROTTLE_ZERO_DEBOUNCE_TIME_MS) {