pref: 提高复位速度
This commit is contained in:
@@ -116,7 +116,7 @@ void by_motion_set_distance2(float distance, int16_t speed)
|
|||||||
|
|
||||||
if (5.0 >= position_abs) {
|
if (5.0 >= position_abs) {
|
||||||
position_abs = 0;
|
position_abs = 0;
|
||||||
by_motion_set_speed_m1(-4);
|
by_motion_set_speed_m1(-10);
|
||||||
motion_busy_flag = 1;
|
motion_busy_flag = 1;
|
||||||
motion_reset_flag = 1;
|
motion_reset_flag = 1;
|
||||||
LOGD("RESET position_abs = %f\r\n", position_abs);
|
LOGD("RESET position_abs = %f\r\n", position_abs);
|
||||||
@@ -171,8 +171,7 @@ void by_motion_init(void)
|
|||||||
DRV_ENABLE();
|
DRV_ENABLE();
|
||||||
|
|
||||||
// 上电回零
|
// 上电回零
|
||||||
DWT_Delay(1000000);
|
by_motion_set_speed_m1(-10);
|
||||||
by_motion_set_speed_m1(-4);
|
|
||||||
while (SET == gpio_input_data_bit_read(GPIOB, GPIO_PINS_3)) {
|
while (SET == gpio_input_data_bit_read(GPIOB, GPIO_PINS_3)) {
|
||||||
// 等待复位
|
// 等待复位
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user