ArduPilot / MAVProxy

MAVLink proxy and command line ground station
GNU General Public License v3.0
466 stars 680 forks source link

crashes on serial disconnect.... #78

Closed davidbuzz closed 6 years ago

davidbuzz commented 10 years ago

with mavproxy running, and connected to a pixhawk/et... when unplugging the USB cable I get this Exception:

I expect It would be more correct for mavproxy to continue running, particularly in situations where it's running "headless", and the user is simply re-connecting their device to their embedded system. Also, a number of GUI mavproxy modules could, if given the chance, display "no device connected" messages, but because of this hard Exception, they can not.

MAV> Exception in thread Thread-2: Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run self.target(_self.__args, *_self.__kwargs) File "./MAVProxy/mavproxy.py", line 875, in main_loop master.wait_heartbeat() File "/usr/local/lib/python2.7/site-packages/pymavlink/mavutil.py", line 328, in wait_heartbeat return self.recv_match(type='HEARTBEAT', blocking=blocking) File "/usr/local/lib/python2.7/site-packages/pymavlink/mavutil.py", line 293, in recv_match m = self.recv_msg() File "/usr/local/lib/python2.7/site-packages/pymavlink/mavutil.py", line 268, in recv_msg s = self.recv(n) File "/usr/local/lib/python2.7/site-packages/pymavlink/mavutil.py", line 693, in recv ret = self.port.read(n) File "/usr/local/lib/python2.7/site-packages/serial/serialposix.py", line 485, in read raise SerialException('read failed: %s' % (e,)) SerialException: read failed: [Errno 6] Device not configured

amilcarlucas commented 6 years ago

Can you test if https://github.com/ArduPilot/pymavlink/pull/212 fixes it ?