From d6e9080ec6e2f6071363d598ef41201b1bd30707 Mon Sep 17 00:00:00 2001 From: sambas Date: Thu, 21 Oct 2010 14:11:53 +0000 Subject: [PATCH] Ground/rawhid: quick hack to help on usb unplug freeze, need to make proper error handling git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1998 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/rawhid/rawhid.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ground/src/plugins/rawhid/rawhid.cpp b/ground/src/plugins/rawhid/rawhid.cpp index 880f35b9d..bc0a52482 100644 --- a/ground/src/plugins/rawhid/rawhid.cpp +++ b/ground/src/plugins/rawhid/rawhid.cpp @@ -161,6 +161,8 @@ void RawHIDReadThread::run() } else // < 0 => error { + //TODO! make proper error handling, this only quick hack for unplug freeze + m_running=false; } } } @@ -242,6 +244,8 @@ void RawHIDWriteThread::run() } else if(ret < 0) // < 0 => error { + //TODO! make proper error handling, this only quick hack for unplug freeze + m_running=false; qDebug() << "Error writing to device"; } else