feat: 增加上电回零
This commit is contained in:
@@ -154,6 +154,14 @@ void by_motion_init(void)
|
|||||||
|
|
||||||
motion_enable_flag = 1;
|
motion_enable_flag = 1;
|
||||||
DRV_ENABLE();
|
DRV_ENABLE();
|
||||||
|
|
||||||
|
// 上电回零
|
||||||
|
DWT_Delay(3000000);
|
||||||
|
by_motion_set_speed_m1(-4);
|
||||||
|
while (SET == gpio_input_data_bit_read(GPIOB, GPIO_PINS_3)) {
|
||||||
|
// 等待复位
|
||||||
|
}
|
||||||
|
by_motion_set_speed_m1(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void by_motion_run(void)
|
void by_motion_run(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user