Skip to content

Commit

Permalink
AP_Mission: make get_next_do_cmd public
Browse files Browse the repository at this point in the history
Copter wants to use this to peek ahead at what DO commands are coming
  • Loading branch information
peterbarker committed Aug 2, 2024
1 parent 2fbb7bc commit c7d715d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libraries/AP_Mission/AP_Mission.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ class AP_Mission
}
#endif

/// returns true if found, false if not found
/// stops and returns false if it hits another navigation command before it finds the first do or conditional command
/// accounts for do_jump commands but never increments the jump's num_times_run (get_next_nav_cmd is responsible for this)
bool get_next_do_cmd(uint16_t start_index, Mission_Command& cmd);

private:
static AP_Mission *_singleton;

Expand Down Expand Up @@ -832,11 +837,6 @@ class AP_Mission
bool get_next_cmd(uint16_t start_index, Mission_Command& cmd, bool increment_jump_num_times_if_found, bool send_gcs_msg = true);

/// get_next_do_cmd - gets next "do" or "conditional" command after start_index
/// returns true if found, false if not found
/// stops and returns false if it hits another navigation command before it finds the first do or conditional command
/// accounts for do_jump commands but never increments the jump's num_times_run (get_next_nav_cmd is responsible for this)
bool get_next_do_cmd(uint16_t start_index, Mission_Command& cmd);

///
/// jump handling methods
///
Expand Down

0 comments on commit c7d715d

Please sign in to comment.