fix : 行走控制器CAN报文ID

This commit is contained in:
Alvin-lyq 2025-09-09 11:08:58 +08:00
parent 3d731f4470
commit 1c3c817bcd
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ struct can_MCU_cmd
can_MCU_cmd_union data;
// 根据报文信息ID (0x0CF1011E其中011E的01改为设备ID)
static constexpr uint32_t CMD_ID = 0x0CF1011E;
static constexpr uint32_t CMD_ID = 0x0CF1051E;
static constexpr bool EXT_FLAG = true;
static constexpr bool RTR_FLAG = false;

View File

@ -54,7 +54,7 @@ void Msg_Handler(const sweeperMsg::CanFrame::SharedPtr msg)
}
// MCU_Status_1 和 MCU_Fault基础ID0x0CF11E00叠加设备ID
case 0x0CF11E00:
case 0x0CF11E05:
{
// 解析电机实际转速data[0]低字节data[1]:高字节)
uint16_t raw_speed = (static_cast<uint16_t>(msg->data[1]) << 8) | msg->data[0];
@ -93,7 +93,7 @@ void Msg_Handler(const sweeperMsg::CanFrame::SharedPtr msg)
}
// MCU_Status_2基础ID0x0CF11F00叠加设备ID
case 0x0CF11F00:
case 0x0CF11F05:
{
// 解析控制器温度data[2]偏移量40℃1℃/bit
int raw_ctrl_temp = static_cast<int>(msg->data[2]);