mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
上传了所有todo任务,为底盘新增了超级电容模块
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
> TODO:
|
||||
>
|
||||
> 1. 增加数据长度可变的协议支持
|
||||
> 1. 对`CANCommGet()`进行修改,使得其可以返回数据是否更新的相关信息。
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct
|
||||
uint16_t ecd; // 0-8191,刻度总共有8192格
|
||||
uint16_t last_ecd; // 上一次读取的编码器值
|
||||
float angle_single_round; // 单圈角度
|
||||
float speed_angle_per_sec; // 度/秒 rounds per minute
|
||||
float speed_angle_per_sec; // 角速度,单位为:度/秒 rounds per minute
|
||||
int16_t given_current; // 实际电流
|
||||
uint8_t temperate; // 温度 Celsius
|
||||
int16_t total_round; // 总圈数,注意方向
|
||||
|
||||
@@ -15,7 +15,7 @@ static referee_info_t referee_info;
|
||||
static uint8_t Judge_Self_ID; // 当前机器人的ID
|
||||
static uint16_t Judge_SelfClient_ID; // 发送者机器人对应的客户端ID
|
||||
|
||||
static void RCRxCallback()
|
||||
static void RefereeRxCallback()
|
||||
{
|
||||
JudgeReadData(referee_usart_instance->recv_buff);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ static void RCRxCallback()
|
||||
referee_info_t *RefereeInit(UART_HandleTypeDef *referee_usart_handle)
|
||||
{
|
||||
USART_Init_Config_s conf;
|
||||
conf.module_callback = RCRxCallback;
|
||||
conf.module_callback = RefereeRxCallback;
|
||||
conf.usart_handle = referee_usart_handle;
|
||||
conf.recv_buff_size = RE_RX_BUFFER_SIZE;
|
||||
referee_usart_instance = USARTRegister(&conf);
|
||||
|
||||
@@ -67,7 +67,7 @@ static void sbus_to_rc(volatile const uint8_t *sbus_buf)
|
||||
* 对sbus_to_rc的简单封装
|
||||
*
|
||||
*/
|
||||
static void RCRxCallback()
|
||||
static void RefereeRxCallback()
|
||||
{
|
||||
sbus_to_rc(rc_usart_instance->recv_buff);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ static void RCRxCallback()
|
||||
RC_ctrl_t *RemoteControlInit(UART_HandleTypeDef *rc_usart_handle)
|
||||
{
|
||||
USART_Init_Config_s conf;
|
||||
conf.module_callback = RCRxCallback;
|
||||
conf.module_callback = RefereeRxCallback;
|
||||
conf.usart_handle = rc_usart_handle;
|
||||
conf.recv_buff_size = REMOTE_CONTROL_FRAME_SIZE;
|
||||
rc_usart_instance = USARTRegister(&conf);
|
||||
|
||||
Reference in New Issue
Block a user