This is a proposed fix for issue #115. The problem there 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. For both functions, a default value of 300 is provided (equal to the previous hard-coded delay time), so existing code will be unaffected.
This is a proposed fix for issue #115. The problem there is that
SerialPortHandler::begin()
callsdelay()
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 toDynamixel2Arduino::begin()
andSerialPortHandler::begin()
to allow the caller to specify the amount of delay, or to disable thedelay()
call entirely by passing zero. For both functions, a default value of 300 is provided (equal to the previous hard-coded delay time), so existing code will be unaffected.