Update syncedproto.c

This commit is contained in:
atc1441
2024-06-19 16:40:34 +02:00
committed by GitHub
parent 564cd655fc
commit f11f8e31fc

View File

@@ -306,7 +306,7 @@ static bool blockRxLoop(const uint32_t timeout)
bool success = false; bool success = false;
// radioRxEnable(true); // radioRxEnable(true);
uint32_t t = clock_time(); uint32_t t = clock_time();
while (!clock_time_exceed(t, 2000 * 1000)) while (!clock_time_exceed(t, timeout * 1000)) // 300 ms is enough here
{ {
int8_t ret = commsRxUnencrypted(inBuffer); int8_t ret = commsRxUnencrypted(inBuffer);
if (ret > 1) if (ret > 1)
@@ -611,7 +611,7 @@ static bool getDataBlock(const uint16_t blockSize)
{ {
// immediately start with the reception of the block data // immediately start with the reception of the block data
} }
blockRxLoop(270); // BLOCK RX LOOP - receive a block, until the timeout has passed blockRxLoop(300); // BLOCK RX LOOP - receive a block, until the timeout has passed
#ifdef DEBUGBLOCKS #ifdef DEBUGBLOCKS
printf("RX %d[", curBlock.blockId); printf("RX %d[", curBlock.blockId);
@@ -940,4 +940,4 @@ void initializeProto()
{ {
getNumSlots(); getNumSlots();
curHighSlotId = getHighSlotId(); curHighSlotId = getHighSlotId();
} }