use for experiment before the demonstration at open-campus

Dependencies:   FEP ikarashiMDC omni PID R1370

Fork of omni_sample by NagaokaRoboticsClub_mbedTeam

Revision:
11:a2e3d11f5750
Parent:
10:73148221684e
Child:
12:c7e91c4c2ffa
diff -r 73148221684e -r a2e3d11f5750 main.cpp
--- a/main.cpp	Mon Sep 04 02:59:46 2017 +0000
+++ b/main.cpp	Mon Sep 04 04:29:54 2017 +0000
@@ -75,15 +75,16 @@
     pidInit();
     while(1) 
     {
-        if(con.receiveState()==0) 
+        if(1)//con.receiveState()==0) 
         {
             error_val = 0;
             //leds[0] = 0;
-            if((R1370.reciveState() == 0)&&(error_val < 4))
+            if(R1370.reciveState() == 0)
             {
                 //omni.computeXY(-1*con.getStick(2),con.getStick(3),con.getStick(0)/-2.0);
                 pid.setProcessValue(R1370.getAngle());
                 pc.printf("%lf    %lf     ",R1370.getAngle(),-1*pid.compute());
+                omni.computeXY(0,0,-1*pid.compute());
                 omni.computeXY(-1*con.getStick(2),con.getStick(3),-1*pid.compute());           
                 for(int i = 0; i < 4; i++) {
                     pc.printf("%lf,",omni.getOutput(i));