feat: 增加转塔电机接口
This commit is contained in:
19
by_cmd.c
19
by_cmd.c
@@ -404,6 +404,25 @@ int by_cmd_send_angle_storage(float angle)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 设置转轴速度
|
||||
*
|
||||
* @param angle
|
||||
* @return int
|
||||
*/
|
||||
int by_cmd_send_angle_zhuan(float angle)
|
||||
{
|
||||
LOCKAPI();
|
||||
log_info("send angle_zhuan angle:%.2f", angle);
|
||||
int ret = 0;
|
||||
uint8_t buff[4] = {0};
|
||||
memcpy(buff, &angle, 4);
|
||||
by_frame_send(0x55, buff, 4);
|
||||
ret = by_cmd_reg_listerning(0x55, 1000);
|
||||
UNLOCKAPI();
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int by_cmd_send_ranging_start(void)
|
||||
{
|
||||
LOCKAPI();
|
||||
|
||||
1
by_cmd.h
1
by_cmd.h
@@ -29,6 +29,7 @@ int by_cmd_send_angle_claw(float angle);
|
||||
int by_cmd_send_angle_camera(float angle);
|
||||
int by_cmd_send_angle_scoop(float angle);
|
||||
int by_cmd_send_angle_storage(float angle);
|
||||
int by_cmd_send_angle_zhuan(float angle);
|
||||
|
||||
int by_cmd_send_ranging_start(void);
|
||||
int by_cmd_recv_ranging_data(float *distance);
|
||||
|
||||
Reference in New Issue
Block a user