mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Zepp OS: Recognize devices with a dash before mac address suffix
This commit is contained in:
parent
944e0d92a7
commit
145c2b8c6c
@ -88,9 +88,10 @@ public abstract class ZeppOsCoordinator extends HuamiCoordinator {
|
|||||||
protected final Pattern getSupportedDeviceName() {
|
protected final Pattern getSupportedDeviceName() {
|
||||||
// Most devices use the exact bluetooth name
|
// Most devices use the exact bluetooth name
|
||||||
// Some devices have a " XXXX" suffix with the last 4 digits of mac address (eg. Mi Band 7)
|
// Some devices have a " XXXX" suffix with the last 4 digits of mac address (eg. Mi Band 7)
|
||||||
// *However*, some devices broadcast a 2nd bluetooth device with "-XXXX" suffix, which is only
|
// *However*, some devices broadcast a 2nd bluetooth device with "-XXXX" suffix, which I believe
|
||||||
// used for calls and Gadgetbridge can't use for pairing.
|
// is only used for calls, and Gadgetbridge can't use for pairing, but I was not yet able to
|
||||||
return Pattern.compile("^" + getDeviceBluetoothName() + "( [A-Z0-9]{4})?$");
|
// fully confirm this, so we still recognize them.
|
||||||
|
return Pattern.compile("^" + getDeviceBluetoothName() + "([- ][A-Z0-9]{4})?$");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
Loading…
Reference in New Issue
Block a user