From d589c591a6beb787cb9fce4b7db328849f99e67b Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 26 Feb 2015 14:36:06 +0900 Subject: [PATCH] Copter: only log home when first set We should also log home when we arm --- ArduCopter/commands.pde | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ArduCopter/commands.pde b/ArduCopter/commands.pde index ccedac07ad..80c056ba87 100644 --- a/ArduCopter/commands.pde +++ b/ArduCopter/commands.pde @@ -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); + } } }