lib/RFM69/RFM69_ATC.cpp
//=============================================================================
//  sendWithRetry() - overrides the base to allow increasing power when repeated ACK requests fail
//=============================================================================
overrides the base to allow increasing power when repeated ACK requests fail
overrides the base to allow increasing power when repeated ACK requests fail
bool RFM69_ATC::sendWithRetry(uint16_t toAddress, const void* buffer, uint8_t bufferSize, uint8_t retries, uint8_t retryWaitTime) {
  uint32_t sentTime;
  for (uint8_t i = 0; i <= retries; i++) {
    send(toAddress, buffer, bufferSize, true);
    sentTime = millis();
    uint8_t maxLevel = _isRFM69HW ? 23 : 31;
    while (millis() - sentTime < retryWaitTime)
      if (ACKReceived(toAddress)) return true;
    if (_powerLevel < maxLevel) {
      setPowerLevel(_powerLevel + _transmitLevelStep);
    }
  }
  return false;
}
bool RFM69_ATC :: sendWithRetry ( uint16_t toAddress , const void * buffer , uint8_t bufferSize , uint8_t retries , uint8_t retryWaitTime ) { uint32_t sentTime ; for ( uint8_t i = 0 ; i <= retries ; i ++ ) { send ( toAddress , buffer , bufferSize , true ) ; sentTime = millis ( ) ; uint8_t maxLevel = _isRFM69HW ? 23 : 31 ; while ( millis ( ) - sentTime < retryWaitTime ) if ( ACKReceived ( toAddress ) ) return true ; if ( _powerLevel < maxLevel ) { setPowerLevel ( _powerLevel + _transmitLevelStep ) ; } } return false ; }
sendWithRetry() - overrides the base to allow increasing power when repeated ACK requests fail
sendWithRetry () - overrides the base to allow increasing power when repeated ACK requests fail