From 3be2516ef8e815f2ab5d891d6aa8977144112c63 Mon Sep 17 00:00:00 2001 From: Bruce Lacey Date: Sat, 17 Dec 2016 12:50:52 -0800 Subject: [PATCH] Update RFM69 to MYS coding standards (#694) --- drivers/RFM69/RFM69.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/RFM69/RFM69.cpp b/drivers/RFM69/RFM69.cpp index 0e67ea5..a9520a9 100644 --- a/drivers/RFM69/RFM69.cpp +++ b/drivers/RFM69/RFM69.cpp @@ -345,7 +345,8 @@ void RFM69::sendFrame(uint8_t toAddress, const void* buffer, uint8_t bufferSize, setMode(RF69_MODE_TX); uint32_t txStart = millis(); while (hwDigitalRead(_interruptPin) == 0 && - millis() - txStart < RF69_TX_LIMIT_MS) {} // wait for DIO0 to turn HIGH signalling transmission finish + millis() - txStart < + RF69_TX_LIMIT_MS) {} // wait for DIO0 to turn HIGH signalling transmission finish //while (readReg(REG_IRQFLAGS2) & RF_IRQFLAGS2_PACKETSENT == 0x00); // wait for ModeReady setMode(RF69_MODE_STANDBY); } @@ -364,7 +365,8 @@ void RFM69::interruptHandler() PAYLOADLEN = PAYLOADLEN > 66 ? 66 : PAYLOADLEN; // precaution TARGETID = SPI.transfer(0); if(!(_promiscuousMode || TARGETID == _address || - TARGETID == RF69_BROADCAST_ADDR) // match this node's address, or broadcast address or anything in promiscuous mode + TARGETID == + RF69_BROADCAST_ADDR) // match this node's address, or broadcast address or anything in promiscuous mode || PAYLOADLEN < 3) { // address situation could receive packets that are malformed and don't fit this libraries extra fields PAYLOADLEN = 0;