Linux: Fix compilation error for rfm69 (#848)
This commit is contained in:
@@ -315,8 +315,10 @@ LOCAL void RFM69_interruptHandler(void)
|
|||||||
headerRead = true;
|
headerRead = true;
|
||||||
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
|
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
|
||||||
// read payload
|
// read payload
|
||||||
readingLength = min(RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1),
|
readingLength = RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1);
|
||||||
RFM69_MAX_PACKET_LEN);
|
if (readingLength < RFM69_MAX_PACKET_LEN) {
|
||||||
|
readingLength = RFM69_MAX_PACKET_LEN;
|
||||||
|
}
|
||||||
RFM69.currentPacket.payloadLen = readingLength;
|
RFM69.currentPacket.payloadLen = readingLength;
|
||||||
RFM69.ackReceived = RFM69_getACKReceived(RFM69.currentPacket.header.controlFlags);
|
RFM69.ackReceived = RFM69_getACKReceived(RFM69.currentPacket.header.controlFlags);
|
||||||
RFM69.dataReceived = !RFM69.ackReceived;
|
RFM69.dataReceived = !RFM69.ackReceived;
|
||||||
|
|||||||
Reference in New Issue
Block a user