AP_Mission: added truncate() function
Used when loading a mission while flying Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
This commit is contained in:
parent
4992e2e2cf
commit
107cc2c126
@ -113,6 +113,15 @@ bool AP_Mission::clear()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// trucate - trunacte any mission items beyond index
|
||||
void AP_Mission::truncate(uint16_t index)
|
||||
{
|
||||
if (_cmd_total > index) {
|
||||
_cmd_total.set_and_save(index);
|
||||
}
|
||||
}
|
||||
|
||||
/// update - ensures the command queues are loaded with the next command and calls main programs command_init and command_verify functions to progress the mission
|
||||
/// should be called at 10hz or higher
|
||||
void AP_Mission::update()
|
||||
|
@ -130,6 +130,9 @@ public:
|
||||
/// returns true if mission was running so it could not be cleared
|
||||
bool clear();
|
||||
|
||||
/// truncate - truncate any mission items beyond given index
|
||||
void truncate(uint16_t index);
|
||||
|
||||
/// update - ensures the command queues are loaded with the next command and calls main programs command_init and command_verify functions to progress the mission
|
||||
/// should be called at 10hz or higher
|
||||
void update();
|
||||
|
Loading…
Reference in New Issue
Block a user