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:
Andrew Tridgell 2015-09-17 20:15:26 +10:00
parent 42ed989da0
commit 9e7c38b933
2 changed files with 1 additions and 5 deletions

View File

@ -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

View File

@ -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);
}
}
/*