- less impact out of nRF, less variables
- tested on single HM-1500, rock solid, but timings need to be reviewed
Known bug:
Any limitation command will be endlessly executed, still after success...
while((micros()-startMicros)<mLastIv->mRxTmoInnerLoop){// listen (4088us or?) 5110us to each channel
mRxChIdx=(mTxChIdx+3)%RF_MAX_CHANNEL_ID;// start with a fixed offset
while((millis()-loopMillis)<mRxTmoOuterLoop){
while((micros()-startMicros)<mRxTmoInnerLoop){// listen (4088us or?) 5110us to each channel
if(mIrqRcvd){
mIrqRcvd=false;
@ -181,7 +138,7 @@ class HmRadio : public Radio {
mRxChIdx=0;*/
//if(++mRxChIdx >= mLastIv->mRxChannels)
if(++mRxChIdx>=mLastIv->mRxChannels)
if(++mRxChIdx>=mRxChannels)
mRxChIdx=0;
uint8_tnextRxCh=(mRxChIdx+mTxChIdx+4)%RF_MAX_CHANNEL_ID;// let 3 channels in shifting out; might cause problems for tx channel 75, see Oberfritze remark to his array
@ -191,8 +148,8 @@ class HmRadio : public Radio {
startMicros=micros();
}
// not finished but time is over
//if(++mRxChIdx >= RF_CHANNELS) // rejoe2: for testing now always start with the first (relative) rx channel
mRxChIdx=1;
//if(++mRxChIdx >= RF_CHANNELS)
// mRxChIdx = 0;
return;
}
@ -287,6 +244,41 @@ class HmRadio : public Radio {