mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-24 01:52:20 +08:00
supercap
This commit is contained in:
@@ -170,11 +170,14 @@ void ChassisInit()
|
||||
|
||||
SuperCap_Init_Config_s cap_conf = {
|
||||
.can_config = {
|
||||
.can_handle = &hcan2,
|
||||
.tx_id = 0x302, // 超级电容默认接收id
|
||||
.rx_id = 0x301, // 超级电容默认发送id,注意tx和rx在其他人看来是反的
|
||||
.can_handle = &hcan2, // 保持你原有的硬件CAN接口不变
|
||||
.tx_id = 0x001, // C板发给超级电容的ID
|
||||
.rx_id = 0x100, // 超级电容发给C板的ID
|
||||
}};
|
||||
cap = SuperCapInit(&cap_conf); // 超级电容初始化
|
||||
cap = SuperCapInit(&cap_conf); // 超级电容初始化 todo 控制
|
||||
|
||||
// (新增)设置超级电容功率补偿,例如补偿5W,可根据实际需求调整
|
||||
SuperCapSetPowerOffset(cap, 5);
|
||||
|
||||
// 发布订阅初始化,如果为双板,则需要can comm来传递消息
|
||||
#ifdef CHASSIS_BOARD
|
||||
|
||||
Reference in New Issue
Block a user