diff --git a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart index c0622312..efbb595b 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_logic.dart @@ -188,17 +188,20 @@ class ConfiguringWifiLogic extends BaseGetXController { state.getGatewayConfigurationStr = "{\"userPeerld\": \"$appPeerId\"}"; } - BlueManage().blueSendData(BlueManage().connectDeviceName, - (BluetoothConnectionState connectionState) async { - if (connectionState == BluetoothConnectionState.connected) { - IoSenderManage.gatewayConfiguringWifiCommand( - ssid: state.wifiNameController.text, - password: state.wifiPWDController.text, - gatewayConfigurationStr: state.getGatewayConfigurationStr, - ); - EasyLoading.show(); - } - }, isAddEquipment: true); + BlueManage().blueSendData( + BlueManage().connectDeviceName, + (BluetoothConnectionState connectionState) async { + if (connectionState == BluetoothConnectionState.connected) { + IoSenderManage.gatewayConfiguringWifiCommand( + ssid: state.wifiNameController.text, + password: state.wifiPWDController.text, + gatewayConfigurationStr: state.getGatewayConfigurationStr, + ); + EasyLoading.show(); + } + }, + isAddEquipment: true, + ); } // 获取设备状态 diff --git a/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart b/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart index c566b4d4..377f5dc4 100644 --- a/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart +++ b/lib/talk/startChart/handle/other/talke_data_over_time_timer_manager.dart @@ -36,6 +36,7 @@ class TalkDataOverTimeTimerManager { talkStatus.setNotTalkData(); talkStatus.setEnd(); AudioPlayerManager().stopRingtone(); + Get.back(); } // 启动定时器 diff --git a/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart b/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart index f8689d9e..9e4807e5 100644 --- a/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart +++ b/lib/talk/startChart/handle/other/talke_ping_over_time_timer_manager.dart @@ -45,7 +45,6 @@ class TalkePingOverTimeTimerManager { // 启动定时器 void start() { - AppLog.log('启动talkping判断'); // 取消之前的定时器 _timer?.cancel(); _timer = Timer(timeout, onTimeout); diff --git a/lib/talk/startChart/views/talkView/talk_view_page.dart b/lib/talk/startChart/views/talkView/talk_view_page.dart index b6149374..df733203 100644 --- a/lib/talk/startChart/views/talkView/talk_view_page.dart +++ b/lib/talk/startChart/views/talkView/talk_view_page.dart @@ -255,72 +255,73 @@ class _TalkViewPageState extends State ) : Container()), //ToDo: 增加对讲调试、正式可删除 - Visibility( - visible: true, - child: Positioned( - top: 20, // 设置在顶部 - left: 20, - right: 20, // 确保调试信息在屏幕宽度内居中 - child: Container( - height: 100, // 设置高度为 100 - color: Colors.black.withOpacity(0.5), // 可选:设置背景颜色和透明度 - padding: const EdgeInsets.all(10), // 可选:设置内边距 - child: Consumer( - builder: (BuildContext context, DebugInfoModel debugInfo, - Widget? child) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'recv ${debugInfo.recvDataRate}KB/s [${debugInfo.recvPacketCount}]', - style: const TextStyle( - color: Colors.white), // 设置文本颜色为白色 - ), - Text( - 'send ${debugInfo.sendDataRate}KB/s [${debugInfo.sendPacketCount}]', - style: const TextStyle( - color: Colors.white), // 设置文本颜色为白色 - ), - ], - ); - }, - ), - ), - )), - // 添加服务器延迟检测 - Positioned( - top: 120, - left: 20, - right: 20, - child: Container( - height: 50, - color: Colors.black.withOpacity(0.5), - padding: const EdgeInsets.all(10), - child: StreamBuilder( - stream: _latencyStream, - builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return const Text( - '检测服务器延迟中...', - style: TextStyle(color: Colors.white), - ); - } else if (snapshot.hasError || - !snapshot.hasData || - snapshot.data == -1) { - return const Text( - '服务器延迟检测失败', - style: TextStyle(color: Colors.white), - ); - } else { - return Text( - '服务器延迟: ${snapshot.data} ms', - style: const TextStyle(color: Colors.white), - ); - } - }, - ), - ), - ), + // Visibility( + // visible: true, + // child: Positioned( + // top: 20, // 设置在顶部 + // left: 20, + // right: 20, // 确保调试信息在屏幕宽度内居中 + // child: Container( + // height: 100, // 设置高度为 100 + // color: Colors.black.withOpacity(0.5), // 可选:设置背景颜色和透明度 + // padding: const EdgeInsets.all(10), // 可选:设置内边距 + // child: Consumer( + // builder: (BuildContext context, DebugInfoModel debugInfo, + // Widget? child) { + // return Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // 'recv ${debugInfo.recvDataRate}KB/s [${debugInfo.recvPacketCount}]', + // style: const TextStyle( + // color: Colors.white), // 设置文本颜色为白色 + // ), + // Text( + // 'send ${debugInfo.sendDataRate}KB/s [${debugInfo.sendPacketCount}]', + // style: const TextStyle( + // color: Colors.white), // 设置文本颜色为白色 + // ), + // ], + // ); + // }, + // ), + // ), + // ), + // ), + // // 添加服务器延迟检测 + // Positioned( + // top: 120, + // left: 20, + // right: 20, + // child: Container( + // height: 50, + // color: Colors.black.withOpacity(0.5), + // padding: const EdgeInsets.all(10), + // child: StreamBuilder( + // stream: _latencyStream, + // builder: (BuildContext context, AsyncSnapshot snapshot) { + // if (snapshot.connectionState == ConnectionState.waiting) { + // return const Text( + // '检测服务器延迟中...', + // style: TextStyle(color: Colors.white), + // ); + // } else if (snapshot.hasError || + // !snapshot.hasData || + // snapshot.data == -1) { + // return const Text( + // '服务器延迟检测失败', + // style: TextStyle(color: Colors.white), + // ); + // } else { + // return Text( + // '服务器延迟: ${snapshot.data} ms', + // style: const TextStyle(color: Colors.white), + // ); + // } + // }, + // ), + // ), + // ), ], ), ),