1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Android USB: Only attempt to open validate devices.

This commit is contained in:
James Cotton 2012-10-02 21:41:28 -05:00
parent 897b07da02
commit ab291ae1e4

View File

@ -123,7 +123,10 @@ public class HidUAVTalk extends TelemetryTask {
while(deviceIterator.hasNext()){
UsbDevice dev = deviceIterator.next();
if (DEBUG) Log.d(TAG, "Testing device: " + dev);
usbManager.requestPermission(dev, permissionIntent);
if( ValidateFoundDevice(dev) ) {
usbManager.requestPermission(dev, permissionIntent);
break;
}
}
if (DEBUG) Log.d(TAG, "Registered the deviceAttachedFilter");