lib/RFM69/RFM69_ATC.cpp
//=============================================================================
// sendAck() - updated to call new sendFrame with additional parameters
//=============================================================================
// should be called immediately after reception in case sender wants ACK
updated to call new sendFrame with additional parameters
should be called immediately after reception in case sender wants ACK
updated to call new sendFrame with additional parameters should be called immediately after reception in case sender wants ACK
void RFM69_ATC::sendACK(const void* buffer, uint8_t bufferSize) {
  ACK_REQUESTED = 0;   
  uint16_t sender = SENDERID;
  int16_t _RSSI = RSSI; 
  bool sendRSSI = ACK_RSSI_REQUESTED;  
  writeReg(REG_PACKETCONFIG2, (readReg(REG_PACKETCONFIG2) & 0xFB) | RF_PACKET2_RXRESTART); 
  uint32_t now = millis();
  while (!canSend() && millis() - now < RF69_CSMA_LIMIT_MS) receiveDone();
  SENDERID = sender;    
  sendFrame(sender, buffer, bufferSize, false, true, sendRSSI, _RSSI);   
  RSSI = _RSSI; 
}
void RFM69_ATC :: sendACK ( const void * buffer , uint8_t bufferSize ) { ACK_REQUESTED = 0 ; uint16_t sender = SENDERID ; int16_t _RSSI = RSSI ; bool sendRSSI = ACK_RSSI_REQUESTED ; writeReg ( REG_PACKETCONFIG2 , ( readReg ( REG_PACKETCONFIG2 ) & 0xFB ) | RF_PACKET2_RXRESTART ) ; uint32_t now = millis ( ) ; while ( ! canSend ( ) && millis ( ) - now < RF69_CSMA_LIMIT_MS ) receiveDone ( ) ; SENDERID = sender ; sendFrame ( sender , buffer , bufferSize , false , true , sendRSSI , _RSSI ) ; RSSI = _RSSI ; }
sendAck() - updated to call new sendFrame with additional parameters
should be called immediately after reception in case sender wants ACK
sendAck () - updated to call new sendFrame with additional parameters should be called immediately after reception in case sender wants ACK
// TomWS1 added to make sure we don't end up in a timing race and infinite loop sending Acks // save payload received RSSI value // avoid RX deadlocks // TomWS1: Restore SenderID after it gets wiped out by receiveDone() // TomWS1: Special override on sendFrame with extra params // restore payload RSSI