1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-16 08:29:15 +01:00

OP-1739 Check for NAKs in autoconfig

This commit is contained in:
Erik Gustavsson 2015-02-28 12:25:24 +01:00
parent 1024406fd9
commit d6bc3878d3

View File

@ -422,8 +422,9 @@ void ubx_autoconfig_run(char * *buffer, uint16_t *bytes_to_send, bool gps_connec
// Continue with next configuration option // Continue with next configuration option
status->retryCount = 0; status->retryCount = 0;
status->lastConfigSent++; status->lastConfigSent++;
} else if (PIOS_DELAY_DiffuS(status->lastStepTimestampRaw) > UBX_REPLY_TIMEOUT) { } else if (PIOS_DELAY_DiffuS(status->lastStepTimestampRaw) > UBX_REPLY_TIMEOUT ||
// timeout, resend the message or abort (ubxLastNak.clsID == status->requiredAck.clsID && ubxLastNak.msgID == status->requiredAck.msgID)) {
// timeout or NAK, resend the message or abort
status->retryCount++; status->retryCount++;
if (status->retryCount > UBX_MAX_RETRIES) { if (status->retryCount > UBX_MAX_RETRIES) {
status->currentStep = INIT_STEP_ERROR; status->currentStep = INIT_STEP_ERROR;