|
|
@ -1156,6 +1156,11 @@ class BleManager extends GetxService { |
|
|
List<String>? uuids, |
|
|
List<String>? uuids, |
|
|
}) async { |
|
|
}) async { |
|
|
try { |
|
|
try { |
|
|
|
|
|
// 在注册新设备前先清除旧设备信息 |
|
|
|
|
|
if (macAddress != null && macAddress != currentDeviceAddress) { |
|
|
|
|
|
clearDeviceInfo(); // 清除上一个设备的信息 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 保存设备地址信息 |
|
|
// 保存设备地址信息 |
|
|
if (macAddress != null) { |
|
|
if (macAddress != null) { |
|
|
currentDeviceAddress = macAddress; |
|
|
currentDeviceAddress = macAddress; |
|
|
|