Individual rx-channel offset

per inverter (based on serial, but unfortunately not working yet)
This commit is contained in:
rejoe2 2024-01-27 17:52:08 +01:00 committed by GitHub
parent 19184727bc
commit 1b4b5874df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View file

@ -154,11 +154,11 @@ class HmRadio : public Radio {
mLastIv->mAckCount++;
//mRxChIdx = (mTxChIdx + 2) % RF_CHANNELS;
mRxChIdx = (mTxChIdx + 3) % RF_CHANNELS;
mRxChIdx = (mTxChIdx + mLastIv->rxOffset) % RF_CHANNELS;
mNrf24->setChannel(mRfChLst[mRxChIdx]);
mNrf24->startListening();
mTimeslotStart = millis();
tempRxChIdx = mRxChIdx;
tempRxChIdx = mRxChIdx; // might be better to start off with one channel less?
rxPendular = false;
mNRFloopChannels = (mLastIv->ivGen == IV_MI);
@ -369,7 +369,10 @@ class HmRadio : public Radio {
DBGPRINT(String(mRfChLst[mTxChIdx]));
DBGPRINT(F(", "));
DBGPRINT(String(mTxRetriesNext));
DBGPRINT(F(" retries | "));
//DBGPRINT(F(" retries | "));
DBGPRINT(F(" ret., rx offset: "));
DBGPRINT(String(iv->rxOffset));
DBGPRINT(F(" | "));
if(*mPrintWholeTrace) {
if(*mPrivacyMode)
ah::dumpBuf(mTxBuf, len, 1, 4);