|
@ -44,8 +44,8 @@ class Communication : public CommQueue<> { |
|
|
if(!valid) |
|
|
if(!valid) |
|
|
return; // empty
|
|
|
return; // empty
|
|
|
|
|
|
|
|
|
uint16_t timeout = q->iv->ivGen != IV_MI ? (q->iv->mGotFragment && q->iv->mGotLastMsg) ? SINGLEFR_TIMEOUT : DEFAULT_TIMEOUT : MI_TIMEOUT; |
|
|
uint16_t timeout = q->iv->ivGen != IV_MI ? ((q->iv->mGotFragment && q->iv->mGotLastMsg) ? SINGLEFR_TIMEOUT : DEFAULT_TIMEOUT) : MI_TIMEOUT; |
|
|
uint16_t timeout_min = q->iv->ivGen != IV_MI ? q->iv->mGotFragment ? SINGLEFR_TIMEOUT : FRSTMSG_TIMEOUT : MI_TIMEOUT; |
|
|
uint16_t timeout_min = q->iv->ivGen != IV_MI ? ((q->iv->mGotFragment) ? SINGLEFR_TIMEOUT : FRSTMSG_TIMEOUT) : MI_TIMEOUT; |
|
|
bool testMode = false; |
|
|
bool testMode = false; |
|
|
|
|
|
|
|
|
switch(mState) { |
|
|
switch(mState) { |
|
@ -63,7 +63,7 @@ class Communication : public CommQueue<> { |
|
|
testMode = mHeu.getTestModeEnabled(); |
|
|
testMode = mHeu.getTestModeEnabled(); |
|
|
q->iv->mGotFragment = false; |
|
|
q->iv->mGotFragment = false; |
|
|
q->iv->mGotLastMsg = false; |
|
|
q->iv->mGotLastMsg = false; |
|
|
mFirstTry = mFirstTry ? false : ( ( (IV_HM == q->iv->ivGen) || (IV_MI == q->iv->ivGen) ) && (q->iv->isAvailable()) || (millis() < 120000) ); |
|
|
mFirstTry = mFirstTry ? false : (((IV_HM == q->iv->ivGen) || (IV_MI == q->iv->ivGen) ) && (q->iv->isAvailable()) || (millis() < 120000)); |
|
|
if(NULL == q->iv->radio) |
|
|
if(NULL == q->iv->radio) |
|
|
cmdDone(true); // can't communicate while radio is not defined!
|
|
|
cmdDone(true); // can't communicate while radio is not defined!
|
|
|
mState = States::START; |
|
|
mState = States::START; |
|
|