更新波形图
This commit is contained in:
@@ -541,7 +541,8 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
||||
DailyLogUtils.printLog("蓝牙获取MAC失败:$e");
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "设备连接失败,请重试".tr,
|
||||
// text: e.message ?? "设备连接失败,请重试".tr,
|
||||
text: "获取不到传感器mac,请重试".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
rethrow;
|
||||
@@ -632,6 +633,12 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
||||
|
||||
try {
|
||||
final mac = await completer.future.timeout(timeout);
|
||||
if (mac == null || mac.isEmpty) {
|
||||
throw Exception("获取MAC失败");
|
||||
}
|
||||
if (mac == "000000000000") {
|
||||
throw Exception("获取MAC失败");
|
||||
}
|
||||
await subscription.cancel();
|
||||
return mac;
|
||||
} catch (_) {
|
||||
|
||||
Reference in New Issue
Block a user