Dynamixel2Arduino icon indicating copy to clipboard operation
Dynamixel2Arduino copied to clipboard

Issue115

Open johnauld opened this issue 2 years ago • 0 comments

This fixes https://github.com/ROBOTIS-GIT/Dynamixel2Arduino/issues/115. The problem described in that issue is that SerialPortHandler::begin() calls delay() unconditionally, which causes a hang if interrupts are disabled at the time of the call (as is the case during FreeRTOS startup).

The solution here is to add a uint32_t delay parameter to Dynamixel2Arduino::begin() and SerialPortHandler::begin() to allow the caller to specify the amount of delay, or to disable the delay() call entirely by passing zero.

The change is backward-compatible. No existing code will be affected, since both functions provide a default value of 500 (which is equal to the previous, recently changed, hard-coded delay time).

johnauld avatar Aug 08 '23 21:08 johnauld