Browse Source

上传服务器代码

newdev_shunjiawei
liwei1dao 1 year ago
parent
commit
c3a41e424d
  1. 2
      lib/core/translations/language/zh_cn.dart
  2. 2
      lib/modules/pairing/controllers/pairing_controller.dart
  3. 3
      lib/modules/pairing/views/pairing_view.dart

2
lib/core/translations/language/zh_cn.dart

@ -960,7 +960,7 @@ const Map<String, String> zhCN = {
"pairingSuccessRedirecting": "配对成功!即将跳转到主页...",
// 配对错误状态文本
"ensureConnectedDeepSoundDevice": "请确保连接的是Voitrans设备",
"ensureConnectedDeepSoundDevice": "当前使用设备:%s,请确保连接的是Voitrans支持的设备",
"deviceAlreadyBoundToOtherAccount": "该设备已被其他账号绑定",
"deviceAssociationFailed": "设备关联失败,请重试",
"scanTimeoutEnsureDeviceNearby": "扫描超时,请确保设备在附近",

2
lib/modules/pairing/controllers/pairing_controller.dart

@ -837,7 +837,7 @@ class PairingController extends GetxController with WidgetsBindingObserver {
}
print(
'获取到 deviceName: $deviceName address: ${device.address} uuids:$uuids');
if (names.contains(deviceName)) {
if (names.any((name) => name.contains(deviceName))) {
if (currentBleState == 2) {
//已连接直接返回
return 9;

3
lib/modules/pairing/views/pairing_view.dart

@ -492,7 +492,8 @@ class _PairingViewState extends State<PairingView>
return 'connectDeepSoundViaSystemBluetooth'
.tr; // 请先通过系统蓝牙连接Voitrans设备
case ErrorType.deviceNotMatch:
return 'ensureConnectedDeepSoundDevice'.tr; // 请确保连接的是Voitrans设备
return 'ensureConnectedDeepSoundDevice'.tr.trArgs(
[controller.currentDevice?.name ?? '']); // 请确保连接的是Voitrans设备
case ErrorType.deviceBound:
return 'deviceAlreadyBoundToOtherAccount'.tr; // 该设备已被其他账号绑定
case ErrorType.associationFailed:

Loading…
Cancel
Save