mirror of https://github.com/ArduPilot/ardupilot
ArduSub: adjust for AP_Mission logging mission-item-starts
This commit is contained in:
parent
0c0a615403
commit
48c9cd6eae
|
@ -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
|
// 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)
|
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;
|
const Location &target_loc = cmd.content.location;
|
||||||
auto alt_frame = target_loc.get_alt_frame();
|
auto alt_frame = target_loc.get_alt_frame();
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,9 @@ void Sub::init_ardupilot()
|
||||||
|
|
||||||
// initialise mission library
|
// initialise mission library
|
||||||
mission.init();
|
mission.init();
|
||||||
|
#if HAL_LOGGING_ENABLED
|
||||||
|
mission.set_log_start_mission_item_bit(MASK_LOG_CMD);
|
||||||
|
#endif
|
||||||
|
|
||||||
// initialise AP_Logger library
|
// initialise AP_Logger library
|
||||||
#if HAL_LOGGING_ENABLED
|
#if HAL_LOGGING_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue