mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Plane: inform dataflash of vehicle arm state
This commit is contained in:
parent
f9802204df
commit
17f5ef4610
ArduPlane
@ -151,11 +151,17 @@ void Plane::loop()
|
||||
scheduler.run(loop_us);
|
||||
}
|
||||
|
||||
void Plane::update_soft_armed()
|
||||
{
|
||||
hal.util->set_soft_armed(arming.is_armed() &&
|
||||
hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED);
|
||||
DataFlash.set_vehicle_armed(hal.util->get_soft_armed());
|
||||
}
|
||||
|
||||
// update AHRS system
|
||||
void Plane::ahrs_update()
|
||||
{
|
||||
hal.util->set_soft_armed(arming.is_armed() &&
|
||||
hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED);
|
||||
update_soft_armed();
|
||||
|
||||
#if HIL_SUPPORT
|
||||
if (g.hil_mode == 1) {
|
||||
|
@ -1095,6 +1095,7 @@ private:
|
||||
void parachute_release();
|
||||
bool parachute_manual_release();
|
||||
void accel_cal_update(void);
|
||||
void update_soft_armed();
|
||||
|
||||
// support for AP_Avoidance custom flight mode, AVOID_ADSB
|
||||
bool avoid_adsb_init(bool ignore_checks);
|
||||
|
@ -815,8 +815,7 @@ int8_t Plane::throttle_percentage(void)
|
||||
void Plane::change_arm_state(void)
|
||||
{
|
||||
Log_Arm_Disarm();
|
||||
hal.util->set_soft_armed(arming.is_armed() &&
|
||||
hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED);
|
||||
update_soft_armed();
|
||||
quadplane.set_armed(hal.util->get_soft_armed());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user