Skip to content

Commit

Permalink
ArduSub: adjust for AP_Mission logging mission-item-starts
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Oct 1, 2024
1 parent 0c0a615 commit 48c9cd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ArduSub/commands_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 3 additions & 0 deletions ArduSub/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48c9cd6

Please sign in to comment.