refactor: remove deprecated zero_force field from manual control frame

VISION_MANUAL_LEN 11→10, frame [SOF:0xA6][yaw_velocity:4][pitch_velocity:4][checksum:1].
Protocol comment, docs, README struct diagram all updated.
This commit is contained in:
2026-06-02 16:41:06 +08:00
parent da6acdcc89
commit 3cb727e151
4 changed files with 13 additions and 19 deletions
+2 -3
View File
@@ -108,7 +108,7 @@ main()
| 帧头 | 长度 | 用途 |
|------|------|------|
| 0xA5 | 10 | 自动/视觉追踪数据帧 (error_x, error_y) |
| 0xA6 | 11 | 手动控制数据帧 (zero_force, yaw_velocity, pitch_velocity) |
| 0xA6 | 10 | 手动控制数据帧 (yaw_velocity, pitch_velocity) |
| 0xA7 | 3 | 命令帧 (模式切换, 激光) |
| 0xA8 | 50 | 调试调参帧 (12 个 float PID 参数) |
@@ -135,7 +135,7 @@ main()
```
上位机 USART10 → DecodeVision() → vision_data (全局结构体)
├── 0xA5 → auto_updated=1, error_x/y
├── 0xA6 → manual_updated=1, zero_force, yaw/pitch velocity
├── 0xA6 → manual_updated=1, yaw/pitch velocity
├── 0xA7 → cmd_pending=1, cmd
└── 0xA8 → debug_updated=1, 12 个 PID 参数
@@ -323,7 +323,6 @@ typedef struct {
typedef struct {
float error_x, error_y; // 自动模式: 归一化误差
uint8_t auto_updated;
uint8_t zero_force; // 手动模式: 零力标志
float yaw_degree_velocity, pitch_degree_velocity; // 手动模式: 角速度
uint8_t manual_updated;
// 调试模式数据