making things reusable by Android

This commit is contained in:
rusefi 2020-06-29 01:22:49 -04:00
parent bee24af97d
commit e9d3f2c3f0
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ public class DfuLogic {
public static final int USB_CLASS_APP_SPECIFIC = 0xfe;
public static final byte DFU_SUBCLASS = 0x01;
public static final byte USB_DT_DFU = 0x21;
public static final String FLASH_TAG = "Flash";
static void uploadImage(USBDfuConnection device, HexImage image) {
// todo: smarter erase handling!

View File

@ -144,7 +144,7 @@ public class DfuDeviceLocator {
String stringDescriptor = LibUsb.getStringDescriptor(deviceHandle, setting.iInterface());
log.info("StringDescriptor: " + stringDescriptor);
if (stringDescriptor.contains("Flash"))
if (stringDescriptor.contains(DfuLogic.FLASH_TAG))
flashRange = DfuSeFlashDescriptor.parse(stringDescriptor);
result = LibUsb.claimInterface(deviceHandle, interfaceNumber);