Release 3.3.0 fixes to serial comms and reliability improvements
(ASCOM issue 19) This release adds a workaround for an issue with the Arduino Leonardo serial comms. When the communications channel was disconnected from the PC end, the Arduino should no longer add output to the serial stream write buffer, but it was. This was resulting in multi-second delays every Arduino main loop and that was causing the XBee comms stack to reset, resulting in a lost connection to the shutter. This has been fixed by making a wrapper class for _Serial, which checks whether there is space in the write buffer before allowing output to be written. This ensures that all serial output never blocks (if there is no enough space, it is assumed that the connection is closed and the output is simply discarded).
#22 We have also fixed an issue with the shutter open and close sensors which didn't work properly if they were triggered multiple times. On the test bench, we only ever get one activation of the sensor when the shutter opens or closes so the code was written to expect that behavior. Several users reported problems and we deduced that the sensor was actually activating multiple times. We addressed this by latching the sensor value in code so that we only detect the first activation.