集成接口 开始执行任务的领域层和数据层和UI层的开发啊(待测试)
集成功能 暂停 取消功能 恢复功能的接口的领域层和数据层的开发 下一步待集成到页面上 优化功能,优化了接口异常和未知异常对页面渲染的影响对用户的体验的不好情况。具体通过弹窗友好提示! 优化更新了tcp指示灯点击出现机器状态中添加选中设备的编号 方便用户使用的明白明了!。 优化更新关闭了tcp重连操作内链条中的获取用户设备和切换设备操作项。 调整了获取无人机状态信息的更新频率 为14秒一次
This commit is contained in:
@@ -946,6 +946,9 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
debugPrint('🎯 [RemoteControl] 设备名称: ${device.deviceName}');
|
||||
debugPrint('🎯 [RemoteControl] 当前TCP状态: ${tcpClient.isConnected ? "已连接" : "未连接"}');
|
||||
|
||||
debugPrint('📦 [RemoteControl] 更新targetDevice状态');
|
||||
emit(state.copyWith(targetDevice: device));
|
||||
debugPrint('✅ [RemoteControl] targetDevice状态已更新');
|
||||
// 🔥 关键修改:选择设备时才连接TCP
|
||||
if (!tcpClient.isConnected) {
|
||||
debugPrint('🔌 [RemoteControl] TCP未连接,开始建立连接...');
|
||||
@@ -981,8 +984,6 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
);
|
||||
});
|
||||
|
||||
debugPrint('📦 [RemoteControl] 更新targetDevice状态');
|
||||
emit(state.copyWith(targetDevice: device));
|
||||
debugPrint('🎯 [RemoteControl] ========== 目标设备设置完成 ==========');
|
||||
}
|
||||
|
||||
@@ -992,4 +993,12 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
// _logger.logWithLevel('🧹 [RemoteControl] 清除待控制设备');
|
||||
emit(state.copyWith(targetDevice: null));
|
||||
}
|
||||
|
||||
/// 🔥 获取设备
|
||||
|
||||
DeviceEntity? getSelectedDevice() {
|
||||
return state.targetDevice;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user