Browse Source
MI - fix MQTT version
+ changed rx/tx logic (times + debug output)
pull/846/head
rejoe2
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
3 deletions
-
src/hm/hmRadio.h
-
src/hm/miPayload.h
|
|
@ -155,10 +155,14 @@ class HmRadio { |
|
|
|
|
|
|
|
uint32_t startMicros = micros(); |
|
|
|
uint32_t loopMillis = millis(); |
|
|
|
while (millis()-loopMillis < 410) { |
|
|
|
while (micros()-startMicros < 5110) { // listen 5110us to each channel
|
|
|
|
|
|
|
|
uint32_t timeslot = 4088;//5110; //3066; //6132;//4088;
|
|
|
|
uint64_t tsCnt = 0; |
|
|
|
while (millis()-loopMillis < 200) { |
|
|
|
while (micros()-startMicros < timeslot) { // listen timeslot us to each channel
|
|
|
|
if (mIrqRcvd) { |
|
|
|
mIrqRcvd = false; |
|
|
|
DBGPRINTLN("*** time: " + String(tsCnt*(uint64_t)timeslot + (uint64_t)(micros()-startMicros)) + " ***"); |
|
|
|
if (getReceived()) { // everything received
|
|
|
|
return true; |
|
|
|
} |
|
|
@ -170,6 +174,7 @@ class HmRadio { |
|
|
|
if(++mRxChIdx >= RF_CHANNELS) |
|
|
|
mRxChIdx = 0; |
|
|
|
mNrf24.setChannel(mRfChLst[mRxChIdx]); |
|
|
|
tsCnt++; |
|
|
|
yield(); |
|
|
|
} |
|
|
|
// not finished but time is over
|
|
|
|
|
|
@ -751,7 +751,7 @@ const byteAssign_t InfoAssignment[] = { |
|
|
|
iv->setQueuedCmdFinished(); |
|
|
|
mStat->rxSuccess++; |
|
|
|
yield(); |
|
|
|
notify(mPayload[iv->id].txCmd); |
|
|
|
notify(RealTimeRunData_Debug); //iv->type == INV_TYPE_4CH ? 0x36 : 0x09 );
|
|
|
|
} |
|
|
|
|
|
|
|
bool build(uint8_t id, bool *complete) { |
|
|
|