Copter: only log home when first set

We should also log home when we arm
This commit is contained in:
Randy Mackay 2015-02-26 14:36:06 +09:00
parent b0c777259f
commit d589c591a6

View File

@ -74,15 +74,13 @@ static bool set_home(const Location& loc)
scaleLongUp = 1.0f/scaleLongDown;
// record home is set
set_home_state(HOME_SET_NOT_LOCKED);
}
// To-Do: doing the stuff below constantly while armed could lead to lots of logging or performance hit?
// log new home position which mission library will pull from ahrs
if (should_log(MASK_LOG_CMD)) {
AP_Mission::Mission_Command temp_cmd;
if (mission.read_cmd_from_storage(0, temp_cmd)) {
Log_Write_Cmd(temp_cmd);
// log new home position which mission library will pull from ahrs
if (should_log(MASK_LOG_CMD)) {
AP_Mission::Mission_Command temp_cmd;
if (mission.read_cmd_from_storage(0, temp_cmd)) {
Log_Write_Cmd(temp_cmd);
}
}
}