// Depending on the program, the module can work on 2403, 2423, 2440, 2461 or 2475MHz.
// Depending on the program, the module can work on 2403, 2423, 2440, 2461 or 2475MHz.
// Channel List 2403, 2423, 2440, 2461, 2475MHz
// Channel List 2403, 2423, 2440, 2461, 2475MHz
@ -163,16 +166,15 @@ class HmRadio {
returntrue;
returntrue;
}
}
}
}
//yield();
yield();
}
}
// switch to next RX channel
// switch to next RX channel
startMicros=micros();
startMicros=micros();
if(++mRxChIdx>=RF_CHANNELS)
if(++mRxChIdx>=RF_CHANNELS)
mRxChIdx=0;
mRxChIdx=0;
mNrf24.setChannel(mRfChLst[mRxChIdx]);
mNrf24.setChannel(mRfChLst[mRxChIdx]);
//yield();
}
yield();
yield();
}
// not finished but time is over
// not finished but time is over
returntrue;
returntrue;
}
}
@ -206,6 +208,7 @@ class HmRadio {
}else{//MI 2nd gen. specific
}else{//MI 2nd gen. specific
switch(cmd){
switch(cmd){
caseTurnOn:
caseTurnOn:
//mTxBuf[0] = 0x50;
mTxBuf[9]=0x55;
mTxBuf[9]=0x55;
mTxBuf[10]=0xaa;
mTxBuf[10]=0xaa;
break;
break;
@ -228,8 +231,10 @@ class HmRadio {
}
}
voidprepareDevInformCmd(uint64_tinvId,uint8_tcmd,uint32_tts,uint16_talarmMesId,boolisRetransmit,uint8_treqfld=TX_REQ_INFO){// might not be necessary to add additional arg.
voidprepareDevInformCmd(uint64_tinvId,uint8_tcmd,uint32_tts,uint16_talarmMesId,boolisRetransmit,uint8_treqfld=TX_REQ_INFO){// might not be necessary to add additional arg.