From 48c9cd6eaea1dfdbe68ffaa683f9cb807711e903 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 27 Sep 2024 17:37:58 +1000 Subject: [PATCH] ArduSub: adjust for AP_Mission logging mission-item-starts --- ArduSub/commands_logic.cpp | 7 ------- ArduSub/system.cpp | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ArduSub/commands_logic.cpp b/ArduSub/commands_logic.cpp index 60e802c45f..c24ac74aa1 100644 --- a/ArduSub/commands_logic.cpp +++ b/ArduSub/commands_logic.cpp @@ -7,13 +7,6 @@ static enum AutoSurfaceState auto_surface_state = AUTO_SURFACE_STATE_GO_TO_LOCAT // start_command - this function will be called when the ap_mission lib wishes to start a new command bool Sub::start_command(const AP_Mission::Mission_Command& cmd) { -#if HAL_LOGGING_ENABLED - // To-Do: logging when new commands start/end - if (should_log(MASK_LOG_CMD)) { - logger.Write_Mission_Cmd(mission, cmd); - } -#endif - const Location &target_loc = cmd.content.location; auto alt_frame = target_loc.get_alt_frame(); diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index 95e7ecd383..72803e6d47 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -140,6 +140,9 @@ void Sub::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