Rover: adjust for AP_Mission logging mission-item-starts

This commit is contained in:
Peter Barker 2024-09-27 17:37:58 +10:00 committed by Andrew Tridgell
parent 48c9cd6eae
commit 981c500845
2 changed files with 3 additions and 7 deletions

View File

@ -512,13 +512,6 @@ void ModeAuto::send_guided_position_target()
/********************************************************************************/
bool ModeAuto::start_command(const AP_Mission::Mission_Command& cmd)
{
#if HAL_LOGGING_ENABLED
// log when new commands start
if (rover.should_log(MASK_LOG_CMD)) {
rover.logger.Write_Mission_Cmd(mission, cmd);
}
#endif
switch (cmd.id) {
case MAV_CMD_NAV_WAYPOINT: // Navigate to Waypoint
return do_nav_wp(cmd, false);

View File

@ -125,6 +125,9 @@ void Rover::init_ardupilot()
#if AP_MISSION_ENABLED
// initialise mission library
mode_auto.mission.init();
#if HAL_LOGGING_ENABLED
mode_auto.mission.set_log_start_mission_item_bit(MASK_LOG_CMD);
#endif
#endif
// initialise AP_Logger library