-->
Page 1 of 1

Timeout for Input

PostPosted: Sat Dec 05, 2015 4:05 pm
by peridot
Would be preferable to have optional timeout value in ms for input command to stop it getting stuck in endless loop in the case of no serial data. Also ability to clear serial input buffer would be nice.

Cheers Mike

Re: Timeout for Input

PostPosted: Mon Dec 07, 2015 9:40 pm
by Mmiscool
Added 2 new commands to handle the situations you outlined.
The new build has been uploaded and is available.

SERIALFLUSH:
Will clear the serial input buffer. Discards all characters stored in the buffer.
serialflush



SERIALTIMEOUT:
Will cause the input command to return what ever is in the serial buffer even if there is no CR LF. Specifying a value of 0 will disable the serial time out. Any non-zero value will be the number of milliseconds it will wait before timing out on an input command.
serialtimeout {value or var}

Re: Timeout for Input

PostPosted: Mon Dec 07, 2015 10:58 pm
by TassyJim
Thank you.
The timeout will make systems much more robust.

Jim

Re: Timeout for Input

PostPosted: Tue Dec 08, 2015 1:37 am
by peridot
Thank-you Mike , I agree its will make the world of difference to serial data transfers.