Browse Source

Merge pull request #4302 from dogmaphobic/crashGuard

Adding a crash guard for when a command resend timeout occurs with an…
QGC4.4
Gus Grubba 8 years ago committed by GitHub
parent
commit
000a4e265c
  1. 6
      src/Vehicle/Vehicle.cc

6
src/Vehicle/Vehicle.cc

@ -1838,6 +1838,12 @@ void Vehicle::sendMavCommand(int component, MAV_CMD command, bool showError, flo @@ -1838,6 +1838,12 @@ void Vehicle::sendMavCommand(int component, MAV_CMD command, bool showError, flo
void Vehicle::_sendMavCommandAgain(void)
{
if(!_mavCommandQueue.size()) {
qWarning() << "Command resend with no commands in queue";
_mavCommandAckTimer.stop();
return;
}
MavCommandQueueEntry_t& queuedCommand = _mavCommandQueue[0];
if (_mavCommandRetryCount++ > _mavCommandMaxRetryCount) {

Loading…
Cancel
Save