mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-13 22:47:15 +02:00
discord .2901
- add longer timeout + more retransmits to GridProfile req. - close GridProfile + GetLossRate req. explicitly (also for heuristiscs)
This commit is contained in:
parent
b942b37cfd
commit
e8185b9e80
2 changed files with 35 additions and 4 deletions
|
@ -121,9 +121,10 @@ class HmRadio : public Radio {
|
|||
|
||||
uint32_t startMicros = micros();
|
||||
uint32_t loopMillis = millis();
|
||||
uint32_t outerLoopTimeout = (mLastIv->mIsSingleframeReq) ? 100 : ((mLastIv->mCmd != AlarmData) ? 400 : 600);
|
||||
uint32_t outerLoopTimeout = (mLastIv->mIsSingleframeReq) ? 100 : ((mLastIv->mCmd != AlarmData) && (mLastIv->mCmd != GridOnProFilePara)) ? 400 : 600;
|
||||
|
||||
while ((millis() - loopMillis) < outerLoopTimeout) {
|
||||
uint32_t startMicros = micros();
|
||||
while ((micros() - startMicros) < 5110) { // listen (4088us or?) 5110us to each channel
|
||||
if (mIrqRcvd) {
|
||||
mIrqRcvd = false;
|
||||
|
@ -137,7 +138,6 @@ class HmRadio : public Radio {
|
|||
// switch to next RX channel
|
||||
mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS;
|
||||
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
||||
startMicros = micros();
|
||||
}
|
||||
// not finished but time is over
|
||||
mRxChIdx = (mRxChIdx + 1) % RF_CHANNELS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue