feat: 增加转塔电机接口

This commit is contained in:
bmy
2024-06-14 17:42:33 +08:00
parent 5f6c342b86
commit e98d111322
2 changed files with 20 additions and 0 deletions

View File

@@ -404,6 +404,25 @@ int by_cmd_send_angle_storage(float angle)
return (ret); 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) int by_cmd_send_ranging_start(void)
{ {
LOCKAPI(); LOCKAPI();

View File

@@ -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_camera(float angle);
int by_cmd_send_angle_scoop(float angle); int by_cmd_send_angle_scoop(float angle);
int by_cmd_send_angle_storage(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_send_ranging_start(void);
int by_cmd_recv_ranging_data(float *distance); int by_cmd_recv_ranging_data(float *distance);