更新睡眠报告提示样式,更新ios蓝牙开关判定
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
//蓝牙指令
|
||||
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
import 'package:easydevice/src/app/thapp.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
||||
|
||||
// wifi列表指令
|
||||
getWifiList(THapp tHapp) async {
|
||||
@@ -111,63 +108,6 @@ Future<bool> sendWifiSetting(wifiItem, String password, THapp tHapp) async {
|
||||
}
|
||||
}
|
||||
|
||||
// getDeviceWifiStatus(THapp tHapp, int times) async {
|
||||
// edm.EasyDartModule.logger.info("发送请求设备已配置网络状态指令");
|
||||
// DailyLogUtils.writeLog("发送请求设备已配置网络状态指令");
|
||||
// try {
|
||||
// var result = await tHapp.send("at+system info", true, (ss) {
|
||||
// var log = ss.log;
|
||||
|
||||
// // 匹配设备状态
|
||||
// final statusMatch = RegExp(r'Status=([^\s]+)').firstMatch(log);
|
||||
// final status = statusMatch?.group(1);
|
||||
// if (status != null) {
|
||||
// print('提取到的 status: $status');
|
||||
|
||||
// // 如果设备连接状态是 "connect",继续检测
|
||||
// if (status.contains('connect')) {
|
||||
// ss.result = true;
|
||||
// ss.over = true;
|
||||
|
||||
// // 匹配 Wi-Fi 连接信息
|
||||
// final wifiInfoMatch = RegExp(
|
||||
// r'WIFI CONNECTED INFO:SSID=([^\s]+),RSSI=([-0-9]+),AUTH=([0-9]+),CH=([0-9]+),BSSID=([A-F0-9]+)')
|
||||
// .firstMatch(log);
|
||||
// if (wifiInfoMatch != null) {
|
||||
// final ssid = wifiInfoMatch.group(1);
|
||||
// final rssi = wifiInfoMatch.group(2);
|
||||
// final auth = wifiInfoMatch.group(3);
|
||||
// final ch = wifiInfoMatch.group(4);
|
||||
// final bssid = wifiInfoMatch.group(5);
|
||||
|
||||
// // 打印并返回 Wi-Fi 信息
|
||||
// print(
|
||||
// 'Wi-Fi 信息: SSID=$ssid, RSSI=$rssi, AUTH=$auth, CH=$ch, BSSID=$bssid');
|
||||
|
||||
// // 停止监听并返回信息
|
||||
// ss.result = {
|
||||
// 'ssid': ssid,
|
||||
// 'rssi': rssi,
|
||||
// 'auth': auth,
|
||||
// 'ch': ch,
|
||||
// 'bssid': bssid,
|
||||
// };
|
||||
// ss.over = true;
|
||||
// return ss.result;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 未找到状态或Wi-Fi信息时,返回 false
|
||||
// return false;
|
||||
// }, times);
|
||||
|
||||
// return result;
|
||||
// } catch (e) {
|
||||
// print(e);
|
||||
// }
|
||||
// }
|
||||
|
||||
getDeviceWifiStatus(THapp tHapp, int times) async {
|
||||
edm.EasyDartModule.logger.info("发送请求设备已配置网络状态指令");
|
||||
DailyLogUtils.writeLog("发送请求设备已配置网络状态指令");
|
||||
@@ -212,7 +152,6 @@ getDeviceWifiStatus(THapp tHapp, int times) async {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 继续监听
|
||||
return false;
|
||||
}, times);
|
||||
|
||||
Reference in New Issue
Block a user