Browse Source

2506

pull/1284/head
rejoe2 2 years ago
committed by GitHub
parent
commit
b4cc663455
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/defines.h
  2. 12
      src/hm/hmRadio.h

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 2705
#define VERSION_PATCH 2706
//-------------------------------------
typedef struct {

12
src/hm/hmRadio.h

@ -122,8 +122,11 @@ class HmRadio : public Radio {
uint32_t startMicros = micros();
uint32_t loopMillis = millis();
//mRxChIdx = mRxChannels - 2; // ensure, we start receiving with first relative channel....
if(!mLastIv->mGotFragment)
mRxChIdx = mLastIv->mRxChanIdx;//(mLastIv->mRxChanIdx + RF_MAX_CHANNEL_ID -1) % RF_MAX_CHANNEL_ID; // make sure, we start with last successfull channel (result will be increased in loop)
//if(mLastIv->mGotFragment)
mRxChIdx = mLastIv->mRxChanIdx - 1; // do not bother if that get's very high, will in this case effectively be 0 before rx chan is set
//else
// mRxChIdx--;
//(mLastIv->mRxChanIdx + RF_MAX_CHANNEL_ID -1) % RF_MAX_CHANNEL_ID; // make sure, we start with last successfull channel (result will be increased in loop)
//mRxChannels - 1; //
//(mTxChIdx + mRxChannels) % RF_MAX_CHANNEL_ID; // start with a fixed offset
while ((millis() - loopMillis) < mRxTmoOuterLoop) {
@ -155,8 +158,9 @@ class HmRadio : public Radio {
// not finished but time is over
//if(++mRxChIdx >= RF_CHANNELS)
// mRxChIdx = 0;
if(!mLastIv->mGotFragment)
mLastIv->mRxChanIdx = mRxChIdx;
//if(!mLastIv->mGotFragment)
mLastIv->mRxChanIdx = mLastIv->mRxChanIdx +1; // + 2;
//mLastIv->mRxChanIdx = ++mRxChIdx;
return;
}

Loading…
Cancel
Save