In the Sending Data section of the README, DATA_LENGTH is defined as 255, but the string that is actually passed to writeSerialPort() has a length of 12 characters. If 255 is, indeed, passed as DATA_LENGTH, undefined behavior may occur and can manifest itself as incomplete strings, and some may even be created automatically rather than explicitly defined by the developer.
I propose that writeSerialPort() should find the length of the *buffer string parameter instead of relying on developer input in order to prevent this issue from occurring in the future.
In the Sending Data section of the README,
DATA_LENGTHis defined as 255, but the string that is actually passed towriteSerialPort()has a length of 12 characters. If 255 is, indeed, passed asDATA_LENGTH, undefined behavior may occur and can manifest itself as incomplete strings, and some may even be created automatically rather than explicitly defined by the developer.I propose that
writeSerialPort()should find the length of the*bufferstring parameter instead of relying on developer input in order to prevent this issue from occurring in the future.