From 65c82a34abea31cfa56bf3c521f3e53affef6353 Mon Sep 17 00:00:00 2001 From: liyi Date: Fri, 21 Mar 2025 16:19:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E5=AF=B9=E8=AE=B2?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E8=AE=B2=E8=AF=B7=E6=B1=82=E8=B6=85=E6=97=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=BA30=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/talk/starChart/constant/talk_constant.dart | 2 +- .../starChart/handle/impl/udp_talk_request_handler.dart | 8 ++++++-- .../other/talke_request_over_time_timer_manager.dart | 2 ++ lib/talk/starChart/star_chart_manage.dart | 9 ++++----- lib/talk/starChart/views/talkView/talk_view_logic.dart | 6 +++--- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/talk/starChart/constant/talk_constant.dart b/lib/talk/starChart/constant/talk_constant.dart index 23b6934f..a3847d50 100644 --- a/lib/talk/starChart/constant/talk_constant.dart +++ b/lib/talk/starChart/constant/talk_constant.dart @@ -3,5 +3,5 @@ class TalkConstant { static const int talkePingOverTime = 10; static const int talkeDataOverTime = 10; // 收到TalkRequest 未处理超时时间(s) - static const int talkeRequestOverTime = 60; + static const int talkeRequestOverTime = 30; } diff --git a/lib/talk/starChart/handle/impl/udp_talk_request_handler.dart b/lib/talk/starChart/handle/impl/udp_talk_request_handler.dart index 44f26c29..8517e46b 100644 --- a/lib/talk/starChart/handle/impl/udp_talk_request_handler.dart +++ b/lib/talk/starChart/handle/impl/udp_talk_request_handler.dart @@ -54,6 +54,12 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle startChartManage.startTalkExpectTimer(); // 停止发送对讲请求 startChartManage.stopCallRequestMessageTimer(); + // 收到应答后取消超时判断 + talkeRequestOverTimeTimerManager.cancel(); + // 启动发送ping + startChartManage.startTalkPingMessageTimer(); + // 启动ping命令超时判断 + talkePingOverTimeTimerManager.start(); } } @@ -74,8 +80,6 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle _showTalkRequestNotification(talkObjectName: talkObjectName); // 设置为等待接听状态 talkStatus.setPassiveCallWaitingAnswer(); - // 启动对讲请求超时定时器 - talkeRequestOverTimeTimerManager.start(); // 收到呼叫请求,跳转到接听页面 if (startChartManage .getDefaultTalkExpect() diff --git a/lib/talk/starChart/handle/other/talke_request_over_time_timer_manager.dart b/lib/talk/starChart/handle/other/talke_request_over_time_timer_manager.dart index 44bb1630..c4347317 100644 --- a/lib/talk/starChart/handle/other/talke_request_over_time_timer_manager.dart +++ b/lib/talk/starChart/handle/other/talke_request_over_time_timer_manager.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:get/get.dart'; +import 'package:star_lock/app_settings/app_settings.dart'; import 'package:star_lock/talk/starChart/constant/talk_constant.dart'; import 'package:star_lock/talk/starChart/constant/talk_status.dart'; import 'package:star_lock/talk/starChart/star_chart_manage.dart'; @@ -34,6 +35,7 @@ class TalkeRequestOverTimeTimerManager { StartChartManage().startTalkRejectMessageTimer(); StartChartManage().stopSendingRbcuInfoMessages(); StartChartManage().stopSendingRbcuProBeMessages(); + StartChartManage().stopCallRequestMessageTimer(); talkStatus.setInitializationCompleted(); Get.back(); } diff --git a/lib/talk/starChart/star_chart_manage.dart b/lib/talk/starChart/star_chart_manage.dart index 1e53b7f0..d379ef01 100644 --- a/lib/talk/starChart/star_chart_manage.dart +++ b/lib/talk/starChart/star_chart_manage.dart @@ -417,8 +417,7 @@ class StartChartManage { void startCallRequestMessageTimer({required String ToPeerId}) async { // 如果已经处于等待接听状态就不发送 if (talkStatus.status != TalkStatus.proactivelyCallWaitingAnswer) { - // 停止播放铃声 - // AudioPlayerManager().playRingtone(); + // 如果是h264则跳转至webview if (_defaultTalkExpect.videoType.contains(VideoTypeE.H264)) { Get.toNamed( Routers.h264WebView, @@ -429,6 +428,7 @@ class StartChartManage { ); } } + // 启动定时器持续发送对讲请求 talkRequestTimer ??= Timer.periodic( Duration( seconds: _defaultIntervalTime, @@ -438,9 +438,8 @@ class StartChartManage { }, ); talkStatus.setProactivelyCallWaitingAnswer(); - startTalkPingMessageTimer(); - // 启动是否收到ping超时判断定时器 - talkePingOverTimeTimerManager.start(); + // 启动对讲请求应答超时判断 + talkeRequestOverTimeTimerManager.start(); } /// 停止持续发送对讲请求 diff --git a/lib/talk/starChart/views/talkView/talk_view_logic.dart b/lib/talk/starChart/views/talkView/talk_view_logic.dart index c901d5ab..a0a79f52 100644 --- a/lib/talk/starChart/views/talkView/talk_view_logic.dart +++ b/lib/talk/starChart/views/talkView/talk_view_logic.dart @@ -125,7 +125,7 @@ class TalkViewLogic extends BaseGetXController { if (_isFirstFrame) { _startTime = currentTime; _isFirstFrame = false; - AppLog.log('记录第一帧的时间戳${currentTime},${talkData.durationMs}'); + // AppLog.log('记录第一帧的时间戳${currentTime},${talkData.durationMs}'); } // 计算实际延迟:当前时间 - 预期播放时间 @@ -249,11 +249,11 @@ class TalkViewLogic extends BaseGetXController { if (delay > delayThresholdHigh && bufferSize < maxBufferSize) { // 延迟较大,增加缓冲区 bufferSize = min(bufferSize + adjustInterval, maxBufferSize); - AppLog.log('📈 增加缓冲区 - 当前大小: $bufferSize, 延迟: ${delay}ms'); + // AppLog.log('📈 增加缓冲区 - 当前大小: $bufferSize, 延迟: ${delay}ms'); } else if (delay < delayThresholdLow && bufferSize > minBufferSize) { // 延迟较小,减少缓冲区 bufferSize = max(bufferSize - adjustInterval, minBufferSize); - AppLog.log('📉 减少缓冲区 - 当前大小: $bufferSize, 延迟: ${delay}ms'); + // AppLog.log('📉 减少缓冲区 - 当前大小: $bufferSize, 延迟: ${delay}ms'); } } From 7f2c2369a3cecbe6627587d763320c1f75e2b9b8 Mon Sep 17 00:00:00 2001 From: liyi Date: Sat, 22 Mar 2025 14:25:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E4=BF=84=E8=AF=AD?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lan/lan_en.json | 1 + lan/lan_keys.json | 2 ++ lan/lan_ru.json | 6 +++-- lan/lan_zh.json | 2 ++ .../configuringWifi/configuringWifi_page.dart | 2 +- .../videoLog/videoLog/videoLog_page.dart | 4 +-- .../gaode/lockAddressGaoDe_page.dart | 21 ++++++++++------ lib/tools/advancedCalendar/src/widget.dart | 25 +++++++++++++------ 8 files changed, 44 insertions(+), 19 deletions(-) diff --git a/lan/lan_en.json b/lan/lan_en.json index 748227b8..56c9bee8 100644 --- a/lan/lan_en.json +++ b/lan/lan_en.json @@ -1147,5 +1147,6 @@ "网关通电后,长按重置按钮5秒,蓝色指示灯闪烁时点击下一步": "After the gateway is powered on, press and hold the reset button for 5 seconds. Click Next when the blue indicator light flashes", "暂无最新记录": "There are currently no latest records available", "请将手机切换至2.4G WiFi进行手动连接": "Please switch your phone to 2.4G WiFi for manual connection", + "请确保网络是2.4GHz Wi-Fi": "Please ensure that the network is 2.4GHz Wi Fi", "网关添加成功": "Gateway added successfully" } diff --git a/lan/lan_keys.json b/lan/lan_keys.json index 0ca0b455..a284f512 100755 --- a/lan/lan_keys.json +++ b/lan/lan_keys.json @@ -1151,5 +1151,7 @@ "暂无最新记录": "暂无最新记录", "请将手机切换至2.4G WiFi进行手动连接": "请将手机切换至2.4G WiFi进行手动连接", "请扫描可视门铃码二维码": "请扫描可视门铃码二维码", + "请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi", + "已选": "已选", "网关添加成功": "网关添加成功" } diff --git a/lan/lan_ru.json b/lan/lan_ru.json index 75878b41..d74b4d67 100644 --- a/lan/lan_ru.json +++ b/lan/lan_ru.json @@ -630,12 +630,12 @@ "关锁": "Закрыть замок", "功能": "Функция", "配件": "Детали", - "云存": "Облачное хранилище", + "云存": "Cloud", "本地": "Эта местность", "3天滚动储存": "3 дня прокатного хранения", "去升级": "Обновить сейчас", "下载列表": "Скачать список", - "已下载": "Загружено", + "已下载": "Downloaded", "全部视频": "Все видео", "已为本设备免费提供3大滚动视频储存服务": "Для этого устройства бесплатно предоставлены три услуги по хранению видео с прокруткой.", "视频播放": "Воспроизведение видео", @@ -1148,5 +1148,7 @@ "3.安装Google Home APP,点击左上角的加号按钮": "3. Установите приложение Google Home и нажмите кнопку plus в левом верхнем углу", "暂无最新记录": "В настоящее время последние данные отсутствуют", "请扫描可视门铃码二维码": "Сканируйте код вызова", + "请确保网络是2.4GHz Wi-Fi": "Убедитесь, что сеть имеет 2,4 ГГц Wi - Fi", + "已选": "Выбранные", "请将手机切换至2.4G WiFi进行手动连接": "Пожалуйста, переключите телефон на 2.4G WiFi для ручного подключения" } \ No newline at end of file diff --git a/lan/lan_zh.json b/lan/lan_zh.json index 4bf1ac49..f2a7ff7d 100755 --- a/lan/lan_zh.json +++ b/lan/lan_zh.json @@ -1151,5 +1151,7 @@ "暂无最新记录": "暂无最新记录", "请将手机切换至2.4G WiFi进行手动连接": "请将手机切换至2.4G WiFi进行手动连接", "请扫描可视门铃码二维码": "请扫描可视门铃码二维码", + "请确保网络是2.4GHz Wi-Fi": "请确保网络是2.4GHz Wi-Fi", + "已选": "已选", "网关添加成功": "网关添加成功" } diff --git a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart index 4e8f238a..1e6d6ac4 100755 --- a/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart +++ b/lib/main/lockDetail/lockSet/configuringWifi/configuringWifi/configuringWifi_page.dart @@ -55,7 +55,7 @@ class _ConfiguringWifiPageState extends State height: 20.h, ), Text( - '请确保网络是2.4GHz Wi-Fi ', + '请确保网络是2.4GHz Wi-Fi'.tr, style: TextStyle( color: AppColors.blackColor, fontSize: 20.sp, diff --git a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart index 97bd6ab6..5e83bee2 100755 --- a/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart +++ b/lib/main/lockDetail/videoLog/videoLog/videoLog_page.dart @@ -143,8 +143,8 @@ class _VideoLogPageState extends State { // nav按钮 Widget navBtn() { - return SizedBox( - width: 300.w, + return Container( + constraints: BoxConstraints(maxWidth: 310.w), // color: Colors.white, child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart b/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart index e219a237..952f56cd 100755 --- a/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart +++ b/lib/mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart @@ -6,6 +6,7 @@ import 'package:amap_flutter_location/amap_flutter_location.dart'; import 'package:amap_flutter_location/amap_location_option.dart'; import 'package:amap_flutter_map/amap_flutter_map.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -175,12 +176,16 @@ class _LockAddressGaoDePageState extends State body: ListView( children: [ Container( - margin: EdgeInsets.only(left: 25.w, top: 40.h, bottom: 40.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text('地理位置'.tr, style: TextStyle(fontSize: 50.sp)), - ], + margin: EdgeInsets.only( + left: 25.w, right: 25.w, top: 40.h, bottom: 40.w), + child: Center( + child: Text( + '地理位置'.tr, + textAlign: TextAlign.center, + style: TextStyle(fontSize: 50.sp), + softWrap: true, + overflow: TextOverflow.visible, + ), ), ), SizedBox( @@ -272,7 +277,9 @@ class _LockAddressGaoDePageState extends State height: 1.sw / 5 * 4 + 65.h * 2, child: Center(child: Text('地图加载中,请稍候。。。'.tr))), ), - SizedBox(height: 200.h), + Container( + constraints: BoxConstraints(maxHeight: 150.h), + ), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ diff --git a/lib/tools/advancedCalendar/src/widget.dart b/lib/tools/advancedCalendar/src/widget.dart index 62dac000..7abd3fee 100755 --- a/lib/tools/advancedCalendar/src/widget.dart +++ b/lib/tools/advancedCalendar/src/widget.dart @@ -3,17 +3,24 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; import 'package:star_lock/tools/eventBusEventManage.dart'; +import 'package:star_lock/translations/current_locale_tool.dart'; import '../../../app_settings/app_settings.dart'; import 'controller.dart'; import 'datetime_util.dart'; part 'date_box.dart'; + part 'handlebar.dart'; + part 'header.dart'; + part 'month_view.dart'; + part 'month_view_bean.dart'; + part 'week_days.dart'; + part 'week_view.dart'; /// Advanced Calendar widget. @@ -162,13 +169,17 @@ class _AdvancedCalendarState extends State // return DateFormat("EEEE").format(list[index]).split('').first; // } // ); - //by DaisyWu 修改源文件为中文环境下 周一到周日 - _weekNames = List.generate(7, (int index) { - String fullWeekName = - DateFormat.E('zh_CN').format(list[index]); // 获取星期的完整形式 - return fullWeekName - .substring(fullWeekName.length - 1); // 获取最后一个字符,即星期的简称 - }); + + final currentLocaleString = CurrentLocaleTool.getCurrentLocaleString(); + if (currentLocaleString == 'zh_CN') { + //by DaisyWu 修改源文件为中文环境下 周一到周日 + _weekNames = List.generate(7, (int index) { + String fullWeekName = + DateFormat.E('zh_CN').format(list[index]); // 获取星期的完整形式 + return fullWeekName + .substring(fullWeekName.length - 1); // 获取最后一个字符,即星期的简称 + }); + } } }