pref: 修改复位动作和延时
This commit is contained in:
@@ -178,13 +178,15 @@ void by_motion_init(void)
|
|||||||
DRV_ENABLE();
|
DRV_ENABLE();
|
||||||
|
|
||||||
// 上电回零
|
// 上电回零
|
||||||
by_motion_set_speed_m1(-20);
|
by_motion_set_speed_m1(-30);
|
||||||
while (SET == gpio_input_data_bit_read(GPIOB, GPIO_PINS_4)) {
|
while (SET == gpio_input_data_bit_read(GPIOB, GPIO_PINS_4)) {
|
||||||
// lwprintf("%f, %f, %f\r\n", param_m1.real_speed, param_m1.target_speed, param_m1.out_pwm);
|
// lwprintf("%f, %f, %f\r\n", param_m1.real_speed, param_m1.target_speed, param_m1.out_pwm);
|
||||||
// 等待复位
|
// 等待复位
|
||||||
}
|
}
|
||||||
by_motion_set_speed_m1(0);
|
by_motion_set_speed_m1(0);
|
||||||
by_motion_set_distance2(100, 30);
|
by_motion_set_distance2(100, 30);
|
||||||
|
delay_ms(2600);
|
||||||
|
by_motion_set_distance2(0, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
void by_motion_run(void)
|
void by_motion_run(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user