Merge branch 'small-changes' of https://github.com/DanielR92/ahoy into DanielR92-small-changes

This commit is contained in:
lumapu 2023-08-27 22:33:26 +02:00
commit eee64e7746
4 changed files with 19 additions and 3 deletions

View file

@ -205,6 +205,7 @@ class HmRadio {
}
cnt++;
}
sendPacket(invId, cnt, isRetransmit, isNoMI);
}
@ -239,6 +240,17 @@ class HmRadio {
return mNrf24.isPVariant();
}
/* Test whether a signal (carrier or otherwise) greater than or equal to -64dBm is present on the channel.
Valid only on nRF24L01P (+) hardware. On nRF24L01, use testCarrier().
Useful to check for interference on the current channel and channel hopping strategies.
bool goodSignal = radio.testRPD();
if(radio.available()){ Serial.println(goodSignal ? "Strong signal > 64dBm" : "Weak signal < 64dBm" ); radio.read(0,0); } */
bool goodSignal(void) {
bool goodSignal = mNrf24.testRPD();
mNrf24.read(0,0);
return goodSignal;
}
std::queue<packet_t> mBufCtrl;
uint32_t mSendCnt;