Fix RFM69 driver (#855)

This commit is contained in:
Olivier
2017-05-21 21:39:44 +02:00
committed by GitHub
parent 00a4deddd6
commit b74805251e
+2 -2
View File
@@ -1,4 +1,4 @@
/*
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
@@ -316,7 +316,7 @@ LOCAL void RFM69_interruptHandler(void)
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
// read payload
readingLength = RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1);
if (readingLength < RFM69_MAX_PACKET_LEN) {
if (readingLength > RFM69_MAX_PACKET_LEN) {
readingLength = RFM69_MAX_PACKET_LEN;
}
RFM69.currentPacket.payloadLen = readingLength;