mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Plane: moved logging of mode to Log_Write_Vehicle_Startup_Messages
this fixes a problem where the initial mode isn't logged on arming
This commit is contained in:
parent
42ed989da0
commit
9e7c38b933
@ -522,6 +522,7 @@ void Plane::Log_Write_Vehicle_Startup_Messages()
|
||||
{
|
||||
// only 200(?) bytes are guaranteed by DataFlash
|
||||
Log_Write_Startup(TYPE_GROUNDSTART_MSG);
|
||||
DataFlash.Log_Write_Mode(control_mode);
|
||||
}
|
||||
|
||||
// start a new log
|
||||
|
@ -762,11 +762,6 @@ 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);
|
||||
|
||||
// log the mode, so the following log is recorded as the correct mode
|
||||
if (should_log(MASK_LOG_MODE)) {
|
||||
DataFlash.Log_Write_Mode(control_mode);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user