Linux: Fix compilation error for rfm69 (#848)

This commit is contained in:
Marcelo Aquino
2017-05-16 08:00:47 +02:00
committed by Olivier
parent 14766382d3
commit 6e648f58da
+4 -2
View File
@@ -315,8 +315,10 @@ LOCAL void RFM69_interruptHandler(void)
headerRead = true;
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
// read payload
readingLength = min(RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1),
RFM69_MAX_PACKET_LEN);
readingLength = RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1);
if (readingLength < RFM69_MAX_PACKET_LEN) {
readingLength = RFM69_MAX_PACKET_LEN;
}
RFM69.currentPacket.payloadLen = readingLength;
RFM69.ackReceived = RFM69_getACKReceived(RFM69.currentPacket.header.controlFlags);
RFM69.dataReceived = !RFM69.ackReceived;