From 2bc67cbedcac1c371796753de244458e5f5491e2 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Tue, 23 Aug 2022 11:11:26 +0200 Subject: [PATCH] Fix: Usage of 'delay()' causes unacceptable large delay between two consecutive RS485 write commands. This change allows for a much faster cadence of write commands. --- src/lib/motors/SmartServo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/motors/SmartServo.cpp b/src/lib/motors/SmartServo.cpp index 8f8e1f7..4e29d75 100644 --- a/src/lib/motors/SmartServo.cpp +++ b/src/lib/motors/SmartServo.cpp @@ -62,7 +62,7 @@ void SmartServoClass::sendPacket() _RS485.endTransmission(); // should now receive an echo of what we just sent while (_RS485.available() < len) { - delay(100); + delayMicroseconds(10); } // discard the echo int i = len;