feat: 换用更简单的通信帧格式

This commit is contained in:
bmy
2024-03-04 15:05:40 +08:00
parent f1c0b63d21
commit 7e7b22c992
20 changed files with 149 additions and 620 deletions

View File

@@ -38,11 +38,8 @@ float in_speed;
float out_speed;
float set_speed = 0.0f;
/**
* @brief
*
*/
int cnt1 = 0;
void sport_motion(void)
{
@@ -50,7 +47,7 @@ void sport_motion(void)
in_gyro = imu660ra_gyro_z; // 陀螺仪输入
in_angle = 0; // 图像远端输入
in_pos = 0; // 图像近端输入
in_speed = encoder_get_count(TIM5_ENCOEDER) / 1024 / 0.01 * 0.25; // 速度输入,m/s
in_speed = encoder_get_count(TIM5_ENCOEDER) / 1024 / 0.01 * 0.25; // 速度输入m/s
encoder_clear_count(TIM5_ENCOEDER); // 清除计数
PID_Compute(&far_gyro_pid);