Browse Source

Plane: moved logging of mode to Log_Write_Vehicle_Startup_Messages

this fixes a problem where the initial mode isn't logged on arming
mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
9e7c38b933
  1. 1
      ArduPlane/Log.cpp
  2. 5
      ArduPlane/system.cpp

1
ArduPlane/Log.cpp

@ -522,6 +522,7 @@ void Plane::Log_Write_Vehicle_Startup_Messages() @@ -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

5
ArduPlane/system.cpp

@ -762,11 +762,6 @@ void Plane::change_arm_state(void) @@ -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…
Cancel
Save