Browse Source

修复电量和连接问题

newdev_shunjiawei
fdp 1 year ago
parent
commit
bfa442cfcc
  1. 3
      lib/modules/home/views/home_view.dart
  2. 4
      lib/modules/pairing/controllers/pairing_controller.dart

3
lib/modules/home/views/home_view.dart

@ -92,7 +92,6 @@ class HomeView extends GetView<HomeController> {
// 设备状态卡片
IntroStepBuilder(
key: const ValueKey('home_device_status'), // 添加唯一key
group: 'home',
order: 1,
onWidgetLoad: () {
@ -121,7 +120,6 @@ class HomeView extends GetView<HomeController> {
SizedBox(height: 20.h),
IntroStepBuilder(
key: const ValueKey('home_wakeup_guide'), // 添加唯一key
group: 'home',
order: 2,
getOverlayPosition: IntroOverlayBuilder.overlayPosition,
@ -797,7 +795,6 @@ class HomeView extends GetView<HomeController> {
Expanded(
flex: 1,
child: IntroStepBuilder(
key: const ValueKey('home_ai_assistant'), // 添加唯一key
group: 'home',
order: 3,
getOverlayPosition: IntroOverlayBuilder.overlayPosition,

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

@ -803,13 +803,13 @@ class PairingController extends GetxController with WidgetsBindingObserver {
}
} else {
//未绑定设备
_bleManager.clearPairedDevices();
Logger.i(_tag, '验证时BLE状态: $currentBleState');
if (currentBleState == 2) {
//已连接 清理
// BleConnectionState.connected
Logger.i(_tag, 'BLE已连接,断开并清理缓存');
_bleManager.clearPairedDevices();
_bleManager.disconnect();
}
}

Loading…
Cancel
Save