07-21-2004 08:05 AM
07-22-2004 10:27 AM
02-04-2016 09:55 AM
Had this problem too. I perform ComRd inside the callback installed by InstallComCallback
on a serial interface (COM port on Windows 7).
Sometimes it happens that the last character in the buffer is a CR. If I give that buffer to
the textbox (SetCtrlVal(panel, textboxctrl, buf)) then the next time the callback is called it will
have a LF at the beginning. Doing a SetCtrlVal on this buffer will give an empty line.
Solution to this was to check if the last character received was a CR and if so, capture the
following LF (ComRd(comPort, buf, 1) ) and then use SetCtrlVal.
I guess this shouldn't be a problem in a Linux environment