Browse Source
re-flexibilisize rx-channels
also for HM 2ch devices
pull/1394/head
rejoe2
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
6 additions and
6 deletions
-
src/hm/hmDefines.h
-
src/hm/hmRadio.h
-
src/hm/hmSystem.h
|
|
@ -90,8 +90,8 @@ const uint8_t duration_reserve[2] = {65,115}; |
|
|
|
#define LIMIT_VERYFAST_IV 70 // time limit to qualify an inverter as very fast answering inverter
|
|
|
|
#define LIMIT_FAST_IV_MI 35 // time limit to qualify a MI type inverter as fast answering inverter
|
|
|
|
#define LIMIT_VERYFAST_IV_MI 22 // time limit to qualify a MI type inverter as very fast answering inverter
|
|
|
|
#define RETRIES_FAST_IV 11 // how often shall a message be automatically retransmitted by the nRF (fast answering inverter)
|
|
|
|
#define RETRIES_VERYFAST_IV 7 // how often shall a message be automatically retransmitted by the nRF (very fast answering inverter)
|
|
|
|
#define RETRIES_FAST_IV 12 // how often shall a message be automatically retransmitted by the nRF (fast answering inverter)
|
|
|
|
#define RETRIES_VERYFAST_IV 9 // how often shall a message be automatically retransmitted by the nRF (very fast answering inverter)
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
|
|
|
@ -122,7 +122,6 @@ class HmRadio : public Radio { |
|
|
|
mNRFloopChannels = true; |
|
|
|
|
|
|
|
mRxPendular = !mRxPendular; |
|
|
|
//innerLoopTimeout = (rxPendular ? 1 : 2)*DURATION_LISTEN_MIN;
|
|
|
|
innerLoopTimeout = DURATION_LISTEN_MIN; |
|
|
|
|
|
|
|
if(mNRFloopChannels) |
|
|
@ -167,7 +166,8 @@ class HmRadio : public Radio { |
|
|
|
|
|
|
|
//innerLoopTimeout = mLastIv->ivGen != IV_MI ? DURATION_TXFRAME : DURATION_ONEFRAME;
|
|
|
|
//innerLoopTimeout = mLastIv->ivGen != IV_MI ? DURATION_LISTEN_MIN : 4;
|
|
|
|
innerLoopTimeout = (mLastIv->mIsSingleframeReq || mLastIv->ivGen == IV_MI) ? DURATION_LISTEN_MIN : DURATION_TXFRAME; |
|
|
|
//innerLoopTimeout = (mLastIv->mIsSingleframeReq || mLastIv->ivGen == IV_MI) ? DURATION_LISTEN_MIN : DURATION_TXFRAME;
|
|
|
|
innerLoopTimeout = DURATION_LISTEN_MIN; |
|
|
|
} |
|
|
|
|
|
|
|
if(rx_ready) { |
|
|
@ -180,7 +180,6 @@ class HmRadio : public Radio { |
|
|
|
innerLoopTimeout = DURATION_LISTEN_MIN; |
|
|
|
mTimeslotStart = millis(); |
|
|
|
if (!mNRFloopChannels) { |
|
|
|
//mRxPendular = true; // stay longer on the next rx channel
|
|
|
|
if (isRxInit) { |
|
|
|
isRxInit = false; |
|
|
|
tempRxChIdx = (mRxChIdx + 4) % RF_CHANNELS; |
|
|
|
|
|
@ -98,7 +98,8 @@ class HmSystem { |
|
|
|
#ifdef DYNAMIC_OFFSET |
|
|
|
iv->rxOffset = iv->ivGen == IV_HM ? 13 : 12; // effective 3 (or 2), but can easily be recognized as default setting
|
|
|
|
#else |
|
|
|
iv->rxOffset = (iv->ivGen == IV_HM && iv->type == INV_TYPE_4CH) ? 3 : 2; // effective 3 (or 2), but can easily be recognized as default setting
|
|
|
|
iv->rxOffset = (iv->ivGen == IV_HM && iv->type == INV_TYPE_4CH) ? 3 : 2; |
|
|
|
iv->rxOffset = iv->ivGen == IV_HM ? 3 : 2; |
|
|
|
#endif |
|
|
|
|
|
|
|
cb(iv); |
|
|
|