Skip to content

Commit 7eef3f1

Browse files
committed
Optimize RS485 rx window timeout
1 parent 0362ec5 commit 7eef3f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/motors/SmartServo.cpp.impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ template <int MAX_MOTORS> void SmartServoClass<MAX_MOTORS>::receiveResponse(int
6363
_rxLen=0;
6464
memset(_rxBuf, 0, sizeof(_rxBuf));
6565
long start = millis();
66-
while ((millis() - start < 100) && (_rxLen < howMany)) {
66+
while ((millis() - start < howMany) && (_rxLen < howMany)) { // timeout_min = 70uS * howMany
6767
if (_RS485.available()) {
6868
uint8_t c = _RS485.read();
6969
//Serial.print(c, HEX);

0 commit comments

Comments
 (0)