jantje/arduino-eclipse-plugin — pull request #174 by kigster (2014-07-09 06:03:28+00:00)
Title: Fixing timing issue with resetting Esplora

It appears that at least on my Mac some assumptions about Esplora are slightly different:
* there are two usb serial ports, not one (cu.xxx and tty.xxx)
* after sending 1200 baud to the COM port it takes absolutely no time for the ports to get reset,
so the checks for change in list of serial ports
are not registering any disappearance, even at 10ms or 0ms interval (I tried!). So I worked around
by switching the failure mode of this check into a warning instead, and allowing us to continue after 2 seconds of unsuccessfully trying to detect port disappearance. This should hopefully be enough on slower computer, but leaves another 6 seconds on Esplora (it keeps bootloader open for 8 seconds), and simply works in the case when COM reset actually worked. I wish there was a way to detect the disappearance, but I think that as soon as we call ```Serial.list()``` after resetting the port, we are already missing the opportunity and the serial ports are back.

An alternative could be to introduce environment variable that simply disables call to ```wait_for_com_Port_to_appear()``` function even if the board is Esplora/Leonardo/etc. That, at least, gives users flexibility to configure this behavior.