mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-03 20:25:54 +02:00
MI - fix MQTT version
+ changed rx/tx logic (times + debug output)
This commit is contained in:
parent
24bfb43b02
commit
e8e216cd69
2 changed files with 8 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue