绑定设备+覆盖模式+控制显示bug+在线更新
This commit is contained in:
@@ -1028,6 +1028,10 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
debugPrint('📦 [RemoteControl] 更新targetDevice状态');
|
||||
emit(state.copyWith(targetDevice: device));
|
||||
debugPrint('✅ [RemoteControl] targetDevice状态已更新');
|
||||
|
||||
// 🔥 MQTT机器状态订阅:切换设备时订阅新设备的topic(与DevicesCubit.switchDevice相同逻辑)
|
||||
debugPrint('📡 [RemoteControl] 开始MQTT机器状态订阅: ${device.deviceName}');
|
||||
deviceStatusBloc.startMqttRealtimeListening(device.deviceName);
|
||||
|
||||
// 🔥 关键修复:TCP 已在登录时建立,设备切换只用 HTTP
|
||||
// 不再创建新 TCP 连接,避免重复发送 0x03 触发服务端推送 have_logged_in
|
||||
|
||||
Reference in New Issue
Block a user