diff --git a/ground/src/plugins/rawhid/rawhidplugin.cpp b/ground/src/plugins/rawhid/rawhidplugin.cpp index c93794826..8b112eb94 100644 --- a/ground/src/plugins/rawhid/rawhidplugin.cpp +++ b/ground/src/plugins/rawhid/rawhidplugin.cpp @@ -77,6 +77,7 @@ RawHIDConnection::RawHIDConnection() { //added by andrew RawHidHandle = NULL; + enablePolling = true; QObject::connect(&m_enumerateThread, SIGNAL(enumerationChanged()), @@ -99,14 +100,16 @@ QStringList RawHIDConnection::availableDevices() QStringList devices; pjrc_rawhid dev; - //open all device we can - int opened = dev.open(MAX_DEVICES, VID, PID, USAGE_PAGE, USAGE); + if (enablePolling) { + //open all device we can + int opened = dev.open(MAX_DEVICES, VID, PID, USAGE_PAGE, USAGE); - //for each devices found, get serial number and close it back - for(int i=0; i