svoe
Dependencies: mbed mbed-STM32F103C8T6 MPU6050_1
Diff: motion.h
- Revision:
- 8:891e4f54e9e2
- Parent:
- 6:6e89cdc3db92
- Child:
- 9:8f98b1c277a4
diff -r 6e89cdc3db92 -r 891e4f54e9e2 motion.h --- a/motion.h Sun May 21 12:04:00 2017 +0000 +++ b/motion.h Fri Aug 18 08:53:15 2017 +0000 @@ -32,6 +32,18 @@ while(motor_busy == 1){proc_counter++;} } } + +void go_no_wait(int cm, bool brake = 1){ + if(cm != 0) { + stop_flag = 0; infinite_flag = 0; + motor_enable = 1; + target_path =old_path + cm; old_path = target_path; + if(cm > 0) path_dir = 1; else path_dir = 0; + angle_task = 0; + motor_busy = 1; + //while(motor_busy == 1){proc_counter++;} + } + } void turn(int deg, bool brake = 1){ if(deg != 0) {