OK, so I am over my little fit of pique now that 1.8.2. has solved the issue.
Ubuntu 16.04, Acer i5 Laptop, Lazarus 1.8.2.
Using LazSerial with an Arduino Mega, I monitor a constant stream of data over Serial and it works well. But, when left running overnight, I often come in of a morning and it has disconnected for some reason. This happens about three times a week.
Is there some way I can monitor the serial stream and if it stops for say, two minutes, then restore the connection, or at least try?
I tried using "OnStatus" code below and manually reboot the Arduino to make it drop the line, it never gets to the Restart line.
if not(ser1.Active) then
begin
RestartSerial; <<-- never gets to go to this procedure
end;
How can I monitor that line status and try to reconnect when it goes down? Code snippets anywhere?
Thanks.