From 0c0a6154031b05bd9965bc63897d7e5ca8b25e63 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 27 Sep 2024 17:37:58 +1000 Subject: [PATCH] ArduPlane: adjust for AP_Mission logging mission-item-starts --- ArduPlane/commands_logic.cpp | 7 ------- ArduPlane/system.cpp | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 6309834ac5..2f3b6344ba 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -12,13 +12,6 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd) plane.target_altitude.terrain_following_pending = false; #endif -#if HAL_LOGGING_ENABLED - // log when new commands start - if (should_log(MASK_LOG_CMD)) { - logger.Write_Mission_Cmd(mission, cmd); - } -#endif - // special handling for nav vs non-nav commands if (AP_Mission::is_nav_cmd(cmd)) { // set takeoff_complete to true so we don't add extra elevator diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index a71e5790c1..b5d412d5fc 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -127,6 +127,9 @@ void Plane::init_ardupilot() // initialise mission library mission.init(); +#if HAL_LOGGING_ENABLED + mission.set_log_start_mission_item_bit(MASK_LOG_CMD); +#endif // initialise AP_Logger library #if HAL_LOGGING_ENABLED