[sldev] Serial port errors

Robin Cornelius robin.cornelius at gmail.com
Sun May 11 00:36:10 PDT 2008


Ajinkya Kale wrote:
> In the idle() function of llappviewer.cpp I did the following to
> continuously poll serial port data :


Um, why are you doing a create file in the idle() loop?

Open and initalise everything outside idle during startup somewhere and
stash the device handle.

Only in idle read the port, watch those timeouts they will stall the viewer.

May be better creating a readthread and letting the serial poll as it
needs to and fill a buffer, then in idle see if the buffer has data,
then you get non blocking IO, as you really don't want any additional
delays in idle().


Then at app close again out side idle clean up and close your port.

Robin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20080511/c77d82b0/signature.pgp


More information about the SLDev mailing list