Closed PeterBowman closed 1 year ago
There seem to be more sophisticated methods in the API, for example see isOpen() and AlreadyOpen.
Anyway, I've never been a big fan of libserial
, see my comments at https://github.com/asrob-uc3m/yarp-devices/issues/13#issuecomment-443159311
No longer an issue after https://github.com/asrob-uc3m/yarp-devices/issues/13#issuecomment-1326759379 (migrated to YARP's serialport device).
@imontesino found out that the LTOD device crashes upon the initial connection check, namely while we try to read the welcome message arriving from the Arduino board:
https://github.com/asrob-uc3m/yarp-devices/blob/29965f0c296c07d0e0dc74e60a628566df00eaa0/libraries/YarpPlugins/LaserTowerOfDeathController/LaserTowerOfDeathController.cpp#L88-L96
The only change wrt previous successful executions: we replaced the Arduino Duemilanove with a Freaduino board (https://github.com/asrob-uc3m/laser-tower-of-death/issues/1#issuecomment-441367894). It was observed that a convenient one-second delay placed right before said lines fixes this issue. Is this a valid approach?