1:修复远程遥控控制状态显示不正确的问题

2:更换端口映射为测试服的8081-59003,9001-59004
This commit is contained in:
2026-08-26 14:23:20 +08:00
parent ca616faf11
commit 7c01229b9e
22 changed files with 399 additions and 119 deletions

View File

@@ -59,7 +59,10 @@ class RemoteTcpDatasource {
final jsonBytes = utf8.encode(jsonStr);
debugPrint('sendSwitchControlRequest[TCP] 发送权限请求指令:$jsonStr');
debugPrint('sendSwitchControlRequest[TCP] 发送权限请求指令:$jsonBytes');
_logger.logWithLevel(
'🔑 [TCP][获取权限] 发送权限请求指令:$jsonStr',
shouldLog: true,
);
// 使用 0x12 指令发送(cmdGetAuth)
// 注意:根据你的协议文档,这里可能是 0x04 或 0x12
@@ -81,8 +84,17 @@ class RemoteTcpDatasource {
debugPrint(
'✅ sendSwitchControlRequest[TCP] 已发送 switch_control 权限请求 (0x${MachineProtocolConstants.cmdGetAuth.toRadixString(16)})',
);
_logger.logWithLevel(
'✅ [TCP][获取权限] 已发送 switch_control 权限请求 (0x${MachineProtocolConstants.cmdGetAuth.toRadixString(16)})',
shouldLog: true,
);
} catch (e) {
debugPrint('❌ sendSwitchControlRequest[TCP] 发送权限请求失败:$e');
_logger.logWithLevel(
'❌ [TCP][获取权限] 发送权限请求失败:$e',
level: 'ERROR',
shouldLog: true,
);
rethrow;
}
}