AP_Mission: Send jump tracking info to GCS

Send jump wp index and jump count to GCS to allow user to track it.
Foramtted as other mission item messages
This commit is contained in:
Jaaaky 2019-04-15 11:35:51 +03:00 committed by Randy Mackay
parent cb3de81058
commit dd4f7e53c3

View File

@ -1722,6 +1722,7 @@ void AP_Mission::increment_jump_times_run(Mission_Command& cmd)
for (uint8_t i=0; i<AP_MISSION_MAX_NUM_DO_JUMP_COMMANDS; i++) {
if (_jump_tracking[i].index == cmd.index) {
_jump_tracking[i].num_times_run++;
gcs().send_text(MAV_SEVERITY_INFO, "Mission: %u Jump %i/%i", _jump_tracking[i].index, _jump_tracking[i].num_times_run, cmd.content.jump.num_times);
return;
}else if(_jump_tracking[i].index == AP_MISSION_CMD_INDEX_NONE) {
// we've searched through all known jump commands and haven't found it so allocate new space in _jump_tracking array