mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-24 01:52:20 +08:00
supercap&PowerCtrl
This commit is contained in:
@@ -44,9 +44,9 @@ typedef struct
|
||||
/* 需要发送给超级电容的控制信息结构体 */
|
||||
typedef struct {
|
||||
uint8_t Enable; // 超级电容使能。1使能,0失能
|
||||
uint8_t Charge; // 超级电容充电。1充电,0放电
|
||||
uint8_t Reserved1; // Reserved 超级电容充电。1充电,0放电
|
||||
uint8_t Powerlimit; // 裁判系统功率限制
|
||||
uint8_t ChargePower; // 超级电容充电功率
|
||||
uint8_t Reserved2; // Reserved 超级电容充电功率
|
||||
} SuperCap_TxMsg_s;
|
||||
#pragma pack()
|
||||
|
||||
@@ -56,6 +56,7 @@ typedef struct
|
||||
CANInstance *can_ins; // CAN实例
|
||||
SuperCap_Msg_s cap_msg; // 超级电容接收信息
|
||||
uint8_t power_offset; // 功率补偿值
|
||||
uint32_t last_update_tick; // 【新增】上次收到数据的时间戳
|
||||
} SuperCapInstance;
|
||||
|
||||
/* 超级电容初始化配置 */
|
||||
@@ -69,6 +70,9 @@ typedef struct
|
||||
*/
|
||||
SuperCapInstance *SuperCapInit(SuperCap_Init_Config_s *supercap_config);
|
||||
|
||||
// 【新增】函数声明
|
||||
uint8_t SuperCapIsOnline(SuperCapInstance *instance);
|
||||
|
||||
/**
|
||||
* @brief 发送超级电容控制信息
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user