Skip to content

Commit eea2124

Browse files
PaulZCndoo
authored andcommitted
Resolve #19 - add AT_RESPONSE_LOOP_DELAY
1 parent 4b126dd commit eea2124

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/IridiumSBD.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,8 @@ bool IridiumSBD::waitForATResponse(char *response, int responseSize, const char
947947
matchTerminatorPos = c == terminator[0] ? 1 : 0;
948948
}
949949
} // while (filteredavailable() > 0)
950+
951+
delay(AT_RESPONSE_LOOP_DELAY); // Resolve #19
950952
} // timer loop
951953
return false;
952954
}

src/IridiumSBD.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ class IridiumSBD
221221
int sendReceiveTimeout;
222222
int startupTimeout;
223223
unsigned long lastCheck = 0; // The time in millis when the I2C bus was last checked (limits I2C traffic)
224-
const uint8_t I2C_POLLING_WAIT_MS = 5; //Limit checking of new characters to every 5 ms (roughly 10 chars at 19200 baud)
224+
const unsigned long I2C_POLLING_WAIT_MS = 5; //Limit checking of new characters to every 5 ms (roughly 10 chars at 19200 baud)
225+
const unsigned long AT_RESPONSE_LOOP_DELAY = 2; //Resolves #19 - 2 ms (roughly 4 chars at 19200 baud)
225226

226227
// State variables
227228
int remainingMessages;

0 commit comments

Comments
 (0)