FC协议(0827 docx): - 控制指令域:字节12,13/16,17由纵倾/横倾姿态数据2改为预留(编码恒0、解码忽略) - 状态反馈域:字节147,148由预留12改为剩余发电量(MWh),贯通JSON/网页显示 - PM→CCU链路:姿态字段4xuchar改为2xshort(数据1),结构体大小与线上布局不变 - 同步更新:CCU转发映射、SnapshotBuilder、pCCU网页、fuelcell网页、SQLite列描述、单测/模拟器 - 修正集成测试遗留断言(20B→24B、心跳d[19]→d[23])并增强预留字节校验 CCU地址可配置: - pPowerManger 支持 moos 配置项 ccuhost/ccuport(默认127.0.0.1:7000) - build-board.sh 增加 --ccu-host/--ccu-port 参数 文档:FC协议文档更新为0827版,清理过期协议docx
This commit is contained in:
@@ -29,8 +29,8 @@ enum : size_t {
|
||||
PO_MODE = 8,
|
||||
PO_CMD = 9,
|
||||
PO_OUTPOWER = 10,
|
||||
PO_PITCH = 11, // 纵倾姿态 数据1=低8位/数据2=高8位 (字节18-19)
|
||||
PO_ROLL = 13, // 横倾姿态 数据1=低8位/数据2=高8位 (字节20-21)
|
||||
PO_PITCH = 11, // 纵倾姿态数据1 int16 (字节18-19)
|
||||
PO_ROLL = 13, // 横倾姿态数据1 int16 (字节20-21)
|
||||
PO_EMER_ALLOW = 15,
|
||||
PO_DEPTH = 16, // u16
|
||||
PO_SUPPLY_CMD = 18,
|
||||
@@ -60,7 +60,7 @@ std::vector<uint8_t> PmControlMessage::encode(const void* obj) const {
|
||||
FieldCodec::putU8(p, PO_MODE, v->mode);
|
||||
FieldCodec::putU8(p, PO_CMD, v->cmd);
|
||||
FieldCodec::putU8(p, PO_OUTPOWER, v->outputPower);
|
||||
FieldCodec::putU16(p, PO_PITCH, static_cast<uint16_t>(v->pitch)); // 数据1=低位/数据2=高位
|
||||
FieldCodec::putU16(p, PO_PITCH, static_cast<uint16_t>(v->pitch)); // 姿态数据1,数据2字节预留
|
||||
FieldCodec::putU16(p, PO_ROLL, static_cast<uint16_t>(v->roll));
|
||||
FieldCodec::putU8(p, PO_EMER_ALLOW, v->emergencyAllow);
|
||||
FieldCodec::putU16(p, PO_DEPTH, v->depth);
|
||||
|
||||
Reference in New Issue
Block a user