Fixed retransmit count

This commit is contained in:
Thomas Basler 2022-07-30 11:59:01 +02:00
parent 442b27e859
commit 0d26337575
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ void HoymilesRadio::loop()
if (nullptr != inv) {
uint8_t verifyResult = inv->verifyAllFragments();
if (verifyResult == FRAGMENT_ALL_MISSING) {
if (_commandQueue.front().get()->getSendCount() < MAX_RESEND_COUNT) {
if (_commandQueue.front().get()->getSendCount() <= MAX_RESEND_COUNT) {
Serial.println(F("Nothing received, resend whole request"));
sendLastPacketAgain();
} else {

View File

@ -14,7 +14,7 @@ using namespace std;
// number of fragments hold in buffer
#define FRAGMENT_BUFFER_SIZE 30
#define MAX_RESEND_COUNT 3
#define MAX_RESEND_COUNT 4
#ifndef HOYMILES_PIN_MISO
#define HOYMILES_PIN_MISO 19