keiichi shimazu / Mbed 2 deprecated NITKK2019_WinterB-Manual_madebyshimazu

Dependencies:   mbed mdc_read

Files at this revision

API Documentation at this revision

Comitter:
shimazukeiichi
Date:
Sat Dec 28 07:38:40 2019 +0000
Parent:
3:42a8da1837f7
Commit message:
NITKK2019_WinterroboconB

Changed in this revision

Control.cpp Show annotated file Show diff for this revision Revisions of this file
Control.h Show annotated file Show diff for this revision Revisions of this file
pinmap.h Show annotated file Show diff for this revision Revisions of this file
--- a/Control.cpp	Sat Dec 28 06:10:55 2019 +0000
+++ b/Control.cpp	Sat Dec 28 07:38:40 2019 +0000
@@ -74,6 +74,26 @@
     }else{
         pwm[5] = 0.0f;
     }
+    if(CheckButton(sb.PS3_SQUARE_bit(),s_time > 500)){
+        if(ls){
+            pwm[6] = 0.40f;
+            pwm[7] = 0.40f;
+        }else{
+            pwm[6] = 0.0f;
+            pwm[7] = 0.0f;
+        }
+    }else{
+        pwm[6] = 0.0f;
+        pwm[7] = 0.0f;
+    }
+    if(CheckButton(sb.PS3_R1_bit(),R1)&&CheckButton(sb.PS3_L1_bit(),L1)){
+        pwm[8] = 0.60f;
+    }else{
+        pwm[8] = 0.0f;
+    }    
+
+
+
 }
 
     
\ No newline at end of file
--- a/Control.h	Sat Dec 28 06:10:55 2019 +0000
+++ b/Control.h	Sat Dec 28 07:38:40 2019 +0000
@@ -11,7 +11,7 @@
             int s_time;
             int Vx,Vy,wl;
             float bias[6];
-            int pwm[6];
+            int pwm[9];
             void OmniControl();
             void ModuleControl(); 
             
--- a/pinmap.h	Sat Dec 28 06:10:55 2019 +0000
+++ b/pinmap.h	Sat Dec 28 07:38:40 2019 +0000
@@ -4,6 +4,7 @@
 #include "SBDBT.h"
 #include "mdc.h"
 
+DigitalIn ls(D5,PullUp);
 sbdbt sb(PA_0,PA_1,115200);
 Serial pc(USBTX,USBRX,115200);
 I2C i2c(D5,D7);