define RFM69_ACK_TIMEOUT
This commit is contained in:
parent
065c912125
commit
999933b7bf
4
RFM69.h
4
RFM69.h
|
|
@ -152,6 +152,8 @@
|
||||||
#define RFM69_CTL_SENDACK 0x80
|
#define RFM69_CTL_SENDACK 0x80
|
||||||
#define RFM69_CTL_REQACK 0x40
|
#define RFM69_CTL_REQACK 0x40
|
||||||
|
|
||||||
|
#define RFM69_ACK_TIMEOUT 30 // 30ms roundtrip req for 61byte packets
|
||||||
|
|
||||||
//Native hardware ListenMode is experimental
|
//Native hardware ListenMode is experimental
|
||||||
//It was determined to be buggy and unreliable, see https://lowpowerlab.com/forum/low-power-techniques/ultra-low-power-listening-mode-for-battery-nodes/msg20261/#msg20261
|
//It was determined to be buggy and unreliable, see https://lowpowerlab.com/forum/low-power-techniques/ultra-low-power-listening-mode-for-battery-nodes/msg20261/#msg20261
|
||||||
//uncomment to try ListenMode, adds ~1K to compiled size
|
//uncomment to try ListenMode, adds ~1K to compiled size
|
||||||
|
|
@ -186,7 +188,7 @@ class RFM69 {
|
||||||
void setNetwork(uint8_t networkID);
|
void setNetwork(uint8_t networkID);
|
||||||
bool canSend();
|
bool canSend();
|
||||||
virtual void send(uint16_t toAddress, const void* buffer, uint8_t bufferSize, bool requestACK=false);
|
virtual void send(uint16_t toAddress, const void* buffer, uint8_t bufferSize, bool requestACK=false);
|
||||||
virtual bool sendWithRetry(uint16_t toAddress, const void* buffer, uint8_t bufferSize, uint8_t retries=2, uint8_t retryWaitTime=40); // 40ms roundtrip req for 61byte packets
|
virtual bool sendWithRetry(uint16_t toAddress, const void* buffer, uint8_t bufferSize, uint8_t retries=2, uint8_t retryWaitTime=RFM69_ACK_TIMEOUT);
|
||||||
virtual bool receiveDone();
|
virtual bool receiveDone();
|
||||||
bool ACKReceived(uint16_t fromNodeID);
|
bool ACKReceived(uint16_t fromNodeID);
|
||||||
bool ACKRequested();
|
bool ACKRequested();
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class RFM69_ATC: public RFM69 {
|
||||||
void sendACK(const void* buffer = "", uint8_t bufferSize=0);
|
void sendACK(const void* buffer = "", uint8_t bufferSize=0);
|
||||||
//void setHighPower(bool onOFF=true, uint8_t PA_ctl=0x60); //have to call it after initialize for RFM69HW
|
//void setHighPower(bool onOFF=true, uint8_t PA_ctl=0x60); //have to call it after initialize for RFM69HW
|
||||||
//void setPowerLevel(uint8_t level); // reduce/increase transmit power level
|
//void setPowerLevel(uint8_t level); // reduce/increase transmit power level
|
||||||
bool sendWithRetry(uint16_t toAddress, const void* buffer, uint8_t bufferSize, uint8_t retries=2, uint8_t retryWaitTime=40); // 40ms roundtrip req for 61byte packets
|
bool sendWithRetry(uint16_t toAddress, const void* buffer, uint8_t bufferSize, uint8_t retries=2, uint8_t retryWaitTime=RFM69_ACK_TIMEOUT);
|
||||||
void enableAutoPower(int16_t targetRSSI=-90); // TWS: New method to enable/disable auto Power control
|
void enableAutoPower(int16_t targetRSSI=-90); // TWS: New method to enable/disable auto Power control
|
||||||
void setMode(uint8_t mode); // TWS: moved from protected to try to build block()/unblock() wrapper
|
void setMode(uint8_t mode); // TWS: moved from protected to try to build block()/unblock() wrapper
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue