mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-20 17:57:11 +02:00
re-flexibilisize rx-channels
also for HM 2ch devices
This commit is contained in:
parent
bba82d8b3a
commit
fddd03af6b
3 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue