sub2 MDC and enc

Dependencies:   2022_NHK_B_canTR FEP_RX22 QEI ikarashiMDC_2byte_ver mbed HOSOKIkikou R1370 SEKIkikou

Files at this revision

API Documentation at this revision

Comitter:
umekou
Date:
Thu Oct 13 03:24:48 2022 +0000
Parent:
7:4e43530672df
Commit message:
del unuse comments

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4e43530672df -r cccc03be9714 main.cpp
--- a/main.cpp	Thu Oct 13 03:23:21 2022 +0000
+++ b/main.cpp	Thu Oct 13 03:24:48 2022 +0000
@@ -75,63 +75,16 @@
     for(int i=0; i < 8; i++){
         motor[i].setSpeed(0);
     }
-//    int bc=0,bn=0;
-//    int currentMode=1;
+
     HOSOKIkikou hosoki(&motor[6],&motor[7], &motor[4], &motor[5], &b[4], NULL, NULL, NULL, NULL, NULL);
     while(1) {   
 //        recieveController();
         Reset=0;   
         updateenc();
         updatejyro();
-        /*
-        bc=b[7]-bn;
-        bn=b[7];
-        
-        if(currentMode==1){
-            if(bc==1){
-                currentMode=2;
-                led = 1;
-                hosoki.stopAll();
-            }
-        }else if(currentMode==2){
-            if(bc==1){
-                currentMode=3;
-                led = 0;
-                hosoki.init(&motor[6],&motor[7], &motor[4], &motor[5], &b[0], &b[1], &b[2], &b[3], &encoderValue[2], &encoderValue[3]);
-            }
-        }else if(currentMode==3){
-            if(bc==1){
-                currentMode=1;
-                led = 1;
-                hosoki.stopAll();
-            }else{
-                hosoki.runAll(-0.9,0.9,0.3,0.3);
-            }
-        }
-        */
         canTR();
-        /*
-        if(stick[2]>80||stick[2]<-80||stick[3]>80||stick[3]<-80){//機構回転
-            if(stick[2]>80){
-                motorSpeed[1] = 0.5;
-            }else if(stick[2]<-80){
-                motorSpeed[1] = -0.5;
-            }
-            if(stick[3]>100){
-                motorSpeed[2] = 0.8;
-            }else if(stick[3]<-100){
-                motorSpeed[2] = -0.8;
-            }
-        } else {
-            motorSpeed[2]=0;
-            motorSpeed[1]=0;
-        }*/
         hosoki.runAll(-0.9,0.9,0,0);
-        
-//        for(int i=1; i < 3; i++){
-//            motor[i].setSpeed(motorSpeed[i]);
-//        }
-        
+
         pc.printf("|wheel:  ");
         for(int i=8; i < 12; i++){
             pc.printf("%.2f  ",motorSpeed[i]);