Skip to content

Commit

Permalink
Merge pull request #133 from adafruit/fix-registration-polling-cycle
Browse files Browse the repository at this point in the history
Fix hardware registration issue
  • Loading branch information
brentru authored Aug 24, 2021
2 parents c15e857 + 8a97752 commit b697bb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Wippersnapper_Registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ bool Wippersnapper_Registration::processRegistration() {
break;
case FSMReg::REG_DECODE_MSG:
if (!pollRegMsg()) {
// delay 10 seconds between polling cycles
delay(10 * 1000);
// back to publishing state
// delay 1s between polling attempts
delay(1 * 1000);
// attempt to publish again
_state = FSMReg::REG_PUBLISH_MSG;
break;
}
Expand Down Expand Up @@ -160,7 +160,7 @@ bool Wippersnapper_Registration::pollRegMsg() {

// poll for response from broker
WS.feedWDT(); // let us drop out if we can't process
WS._mqtt->processPackets(10);
WS._mqtt->processPackets(100);
if (WS._boardStatus == WS_BOARD_DEF_OK)
is_success = true;

Expand Down

0 comments on commit b697bb8

Please sign in to comment.