From 17a9aa3b20b4aec192754491df71dad15ab6fb89 Mon Sep 17 00:00:00 2001 From: Daniel Dakhno Date: Fri, 6 Oct 2023 13:13:09 +0200 Subject: [PATCH] VESC: added name matching for Coordinator#supports --- .../gadgetbridge/devices/vesc/VescCoordinator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/vesc/VescCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/vesc/VescCoordinator.java index f5ccb0896..347125afd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/vesc/VescCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/vesc/VescCoordinator.java @@ -70,6 +70,9 @@ public class VescCoordinator extends AbstractBLEDeviceCoordinator { @Override public boolean supports(GBDeviceCandidate candidate) { + if(!candidate.getName().toLowerCase().contains("vesc")){ + return false; + } ParcelUuid[] uuids = candidate.getServiceUuids(); for(ParcelUuid uuid : uuids){ if(uuid.getUuid().toString().equals(UUID_SERVICE_SERIAL_NRF)){