kani

Dependencies:   2017NHKpin_config FEP omni_wheel PID R1307 ikarashiMDC

classDiagram

    \ ̄\                   / ̄/ 
/l     \  \             /  / lヽ  
| ヽ  ヽ   |           |  /  / | 
\ ` ‐ヽ  ヽ  ●        ●         /  / ‐  / 
  \ __ l  |  ||___|| /  l __ / 
     \  \ /      \/ 
      /\|   人__人  |/\    <ズワイガニ  
    //\|             |/\\     
    //\|   ケガニ            |/\\     
    /     . \_____/         \ 

                               ┏┓        ┏━┓┏┓              
     ┏┓         ┏┓┏┓   ┏┓    ┏┓┗┛     ┏┓ ┗┓┃┗┛              
┏┛┗━┓  ┃┃┃┃    ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ 
┗┓┏━┛  ┃┃┗┛    ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛    
┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓      ┏┛┃┃┃        ┃┃              
┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛      ┗━┛┃┃        ┃┃┏┓          
┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃         ┏┛┃        ┃┃┃┗━━┓    
┗┛┗━━┛┗━━━┛┗┛┗━━┛         ┗━┛        ┗┛┗━━━┛  

Files at this revision

API Documentation at this revision

Comitter:
takeuchi
Date:
Fri Dec 22 17:34:28 2017 +0900
Parent:
54:be0b5d603562
Commit message:
reflesh code

Changed in this revision

bot/bot.cpp Show annotated file Show diff for this revision Revisions of this file
bot/slider/slider.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r be0b5d603562 -r f9e13797024f bot/bot.cpp
--- a/bot/bot.cpp	Fri Dec 01 16:10:23 2017 +0900
+++ b/bot/bot.cpp	Fri Dec 22 17:34:28 2017 +0900
@@ -20,7 +20,6 @@
     debugSerial(USBTX, USBRX, 115200),
     faceMode(0)
 {
-    debugSerial.printf("OK\r\n");
     for(int i = 0; i < 3; i++) {
         armMotor[i].braking = true;
     }
@@ -54,7 +53,6 @@
 void Bot::controllDrive()
 {
     if(receiveSuccessed) {
-        debugSerial.printf("%d\n\r", plane.getRawDegree());
         led[1] = !led[1];
         if(pad.getNorm(1) > 0.5) {
             plane.setPoint((pad.getRadian(1) - M_PI / 2) * (180.0 / M_PI));
@@ -65,7 +63,7 @@
                 -pad.getStick(1),
                 0,
                 0,
-                -pad.getStick(2) / 3.0 // PIDC::calculationResult
+                -pad.getStick(2) / 3.0 
                 );
     } else {
         quadOmni.moveXY(0, 0, 0);
@@ -82,7 +80,6 @@
 
     if(!pad.getButton2(4)) {
         axis.resetOffset();
-        debugSerial.printf("Force RESeT\n\r");
     }
 
     if((beforestick >= 0.2 && pad.getStick(2) < 0.2) || (beforestick <= -0.2 && pad.getStick(2) > -0.2)) {
@@ -186,10 +183,8 @@
 {
     if(receiveSuccessed) {
         if(!pad.getButton1(2)) {
-            debugSerial.printf("ROLL+\n\r");
             armMotor[ROLL].setSpeed(1.0);
         } else if(!pad.getButton1(4)) {
-            debugSerial.printf("ROLL-\n\r");
             armMotor[ROLL].setSpeed(-1.0);
         }
         if(pad.getButton1(2) && pad.getButton1(4)) {
@@ -197,11 +192,9 @@
         }
 
         if(!pad.getButton2(3)) {
-            debugSerial.printf("FUKUDA\n\r");
             armMotor[SWORD].setSpeed(1.0);
         }
         if(!pad.getButton2(2)) {
-            debugSerial.printf("FUKUDA\n\r");
             armMotor[SWORD].setSpeed(-1.0);
         }
         if(pad.getButton2(3) && pad.getButton2(2)) armMotor[SWORD].setSpeed(0.0);
@@ -209,7 +202,6 @@
         slider.slide(pad.getStick(3));
 
         if(!pad.getButton2(1)) {
-            debugSerial.printf("DESTROYYY\n\r");
             armMotor[DESTROY].setSpeed(-1.0);
         } else if(!pad.getButton1(0)) {
             armMotor[DESTROY].setSpeed(1.0);
diff -r be0b5d603562 -r f9e13797024f bot/slider/slider.cpp
--- a/bot/slider/slider.cpp	Fri Dec 01 16:10:23 2017 +0900
+++ b/bot/slider/slider.cpp	Fri Dec 22 17:34:28 2017 +0900
@@ -7,7 +7,6 @@
 	slideSerial(USBTX, USBRX, 115200)
 {
 	slideMotor.braking = true;
-    slideSerial.printf("slide OK\r\n");
 }
 
 void Slider::slide(float speed) {
diff -r be0b5d603562 -r f9e13797024f main.cpp
--- a/main.cpp	Fri Dec 01 16:10:23 2017 +0900
+++ b/main.cpp	Fri Dec 22 17:34:28 2017 +0900
@@ -11,15 +11,8 @@
     while(1) {
         t.start();
         KANI.confirmAll();
-        //KANI.controllDrive();
         KANI.controllDrive2();
-        // KANI.controllDrive3();
-        //KANI.controllDrive4();
         KANI.controllMech();
         KANI.calibrate();
-        //wait(INTERVAL);
-        //t.stop();
-        //pc.printf("t: %dms\r\n", t.read_ms());
-        //t.reset();
     }
 }