svoe

Dependencies:   mbed mbed-STM32F103C8T6 MPU6050_1

Revision:
13:789b451cc27d
Parent:
12:721a9ea55e91
Child:
15:960b922433d1
diff -r 721a9ea55e91 -r 789b451cc27d main.cpp
--- a/main.cpp	Sat Nov 03 11:43:03 2018 +0000
+++ b/main.cpp	Sun Nov 11 09:20:35 2018 +0000
@@ -11,8 +11,11 @@
 #include "system.h"
 #include "sound.h"
 
+
+
 int main() {
     int k = 0;
+    wait_ms(1000);
     system_init();
     //gyro_x=0, gyro_y=0, gyro_angle=0, gyro_v=0, gyro_s=0;
     current.x = 0;
@@ -24,7 +27,9 @@
         if(external_command != 0) command_process();
         realtime_flag = 0;
         k++;
-        if (k > 398) { k = 0;  } else { target.x = 0.2 * int(k/200); }
+        //target.x = 0;
+        //target.y = 0;
+        if (k > 3596) { k = 0;  } else { target.x = trajectory[int(k/400)][1];target.y = trajectory[int(k/400)][0]; }
         //k++ ; target.x = 0.1*int(k/200);
         }
     //while(1){proc_counter++;}