Closed pizthewiz closed 8 years ago
I should have also mentioned that I tested this on OS X 10.10.3 with the system Python 2.7.6 and pyserial 2.7.
Hmm, I still run into the port use issue from time to time, but I think the explicit close in onExit is a good idea yet.
It would appear as though the serial port is left open in some uses requiring a device unplug and replug before it can be used again, which is also called out in the README. Digging into the code to investigate, the UART's serial port is closed in a few error handling situations and in the UART destructor. In the CTRL+C/onExit handling, apparently the UART destructor isn't always called, so this adds an explicit call to it in the PacketReader's doExit.