Fix RFMxx deadlock and minor optimization (#1099)

This commit is contained in:
tekka
2018-05-01 22:31:16 +02:00
committed by Henrik Ekblad
parent 1c5853ce79
commit 3c07390323
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -550,7 +550,7 @@ LOCAL bool RFM95_sendWithRetry(const uint8_t recipient, const void *buffer,
return true;
}
const uint32_t enterMS = hwMillis();
while (hwMillis() - enterMS < retryWaitTime) {
while (hwMillis() - enterMS < retryWaitTime && !RFM95.dataReceived) {
RFM95_handler();
if (RFM95.ackReceived) {
const uint8_t sender = RFM95.currentPacket.header.sender;