修复路劲规划暂停和继续和停止的tcp指令的数据格式

This commit is contained in:
2026-03-11 17:15:28 +08:00
parent 89de0bc384
commit f3bcba15b1
4 changed files with 106 additions and 15 deletions

View File

@@ -277,12 +277,10 @@ class TcpClient {
void sendDeviceStateChange(RoutePlanSendEntity routePlanSendEntity) {
if (_socket == null) return;
final payload = routePlanSendEntity.toBytes();
//_socket!.add(payload);
sendRaw(0x02, payload);
// 🔥 核心修复:直接发送字节数组,不再用 sendRaw 包装
_socket!.add(payload);
var counts = routePlanSendEntity.pointCounts;
var string = routePlanSendEntity.toString();
print("sendDeviceStateChange 底层发送指令完成,数据:$counts");
}