Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: manualMode.h
- Revision:
- 30:cd344beb415d
- Parent:
- 27:88863fab46c0
- Child:
- 32:b8c8ad2eeca7
--- a/manualMode.h	Tue Nov 10 07:46:00 2015 +0000
+++ b/manualMode.h	Tue Nov 10 09:42:33 2015 +0000
@@ -9,11 +9,12 @@
             autoflag=1;
             Indicator4=1;
             IndicatorAuto=0;
-            direction_controller.setTunings(36.0,3.0,0.0);
-            resetState();
+            resetState(1);
             flaga=0;
             step=114;
             CStep=114;
+            mstep=114;
+            mCStep=114;
             spcount=speed;
             dpcount=0.0;
         }
@@ -48,7 +49,8 @@
     else if(b==8){
         if(edge8){
             edge8=0;
-            sendData(1,5);
+            sendData(1,1);
+            wait(0.5);
         }
     }
     else if(b==1){
@@ -79,27 +81,37 @@
             sendData(5,stateR);
         }
     }
-    /*if(b==2){
-        if(edge2){
-            edge2=0;
-            targ_sita+=PI/4;
+    else if((b==10)&&(!flaga)){ //Swing Start
+        if(edge10){
+            edge10=0;
+            resetState(0);
+            flagf=1;
+            spcount=0.0;
+            dpcount=0.0;
+            direction_controller.setBias(0.0);
+            sendData(5,90); //right
+            wait(0.05);
+            sendData(4,90); //left
+            wait(0.05);
+            sendData(6,90); //middle
+            stateR = 90;
+            stateL = 90;
+            mstep   = 0;
+            mCStep  = 0;
+            flaga  = 1;
         }
     }
-    else if(b==3){
-        if(edge3){
-            edge3=0;
-            targ_sita-=PI/4;
-        }
-    }*/
-    if(b!=7) edge7=1;
     if(b!=1) edge1=1;
     if(b!=2) edge2=1;
     if(b!=3) edge3=1;
     if(b!=4) edge4=1;
     if(b!=5) edge5=1;
     if(b!=6) edge6=1;
+    if(b!=7) edge7=1;
     if(b!=8) edge8=1;
     if(b!=9) edge9=1;
+    if(b!=10) edge10=1;
+    if(b!=11) edge11=1;
 }
 
-#endif /*manualMode.h*/
+#endif /*manualMode.h*/
\ No newline at end of file