Skip to content

Commit

Permalink
ArduPlane: 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 9f1690a commit 0c0a615
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ArduPlane/commands_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ArduPlane/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c0a615

Please sign in to comment.