feat: 增加通信内容
This commit is contained in:
@@ -51,11 +51,12 @@ float sp_Kd = 0.0f;
|
||||
float in_speed;
|
||||
float out_speed;
|
||||
|
||||
float set_speed0 = 460.0f;
|
||||
float set_speed1 = 460.0f;
|
||||
int cnt1 = 0;
|
||||
int cnt2 = 0;
|
||||
uint32_t in_state = 0;
|
||||
float set_speed0 = 460.0f;
|
||||
float set_speed1 = 460.0f;
|
||||
int cnt1 = 0;
|
||||
int cnt2 = 0;
|
||||
uint8_t in_state = 0;
|
||||
uint8_t in_stop = 0;
|
||||
|
||||
uint32_t pwm_duty_ls;
|
||||
uint32_t pwm_duty_rs;
|
||||
@@ -86,7 +87,10 @@ float sport_get_speed(void)
|
||||
|
||||
void sport_motion(void)
|
||||
{
|
||||
if (1 == in_state) {
|
||||
if (1 == in_stop) {
|
||||
bt_fly_flag = bt_run_flag = 0;
|
||||
}
|
||||
if (0 == in_state || 2 == in_state) {
|
||||
PID_SetTunings(&far_gyro_pid, an_Kp1, an_Ki1, an_Kd1);
|
||||
PID_SetTunings(&near_pos_pid, po_Kp1, po_Ki1, po_Kd1);
|
||||
PID_SetTunings(&far_gyro_pid, gy_Kp1, gy_Ki1, gy_Kd1);
|
||||
|
||||
Reference in New Issue
Block a user