基本クラス

Dependents:   300_PS3com Quadrifoglio_PS3COM

Revision:
3:9b1aefdd251a
Parent:
2:9d9681465f4a
Child:
4:c9ef83cbe905
diff -r 9d9681465f4a -r 9b1aefdd251a Master.cpp
--- a/Master.cpp	Wed Jun 15 09:32:21 2022 +0000
+++ b/Master.cpp	Sat Jun 18 08:42:38 2022 +0000
@@ -2,19 +2,15 @@
 
 Master::Master() :
       pc(USBTX, USBRX, 115200)
-      ,shot(kicker)
-      ,drib(ESCpin)
+      ,shot(Pin_Kicker)
+      ,drib(Pin_Dribbler)
 {
-    omni.wheel[0].setRadian(PI * 1.0 / 4.0);
-    omni.wheel[1].setRadian(PI * 3.0 / 4.0);
-    omni.wheel[2].setRadian(PI * 5.0 / 4.0);
-    omni.wheel[3].setRadian(PI * 7.0 / 4.0);
     motor[0] = new KohiMD(Pin_motor_0);
     motor[1] = new KohiMD(Pin_motor_1);
     motor[2] = new KohiMD(Pin_motor_2);
     motor[3] = new KohiMD(Pin_motor_3);
     shot.setkickperiod(2.0);
-    shot.setoutputtime(0.1);
+    shot.setoutputtime(0.15);
     drib.setspeed(0.0);
 }
 
@@ -25,22 +21,6 @@
     trigger = trigger_;
 }
 
-void Master::PS3Com()
-{
-    for(int i=0; i < 4; i++) {   
-        if (button[i+4]) {
-            pwm = 0.5;
-        } else if (button[i+4+4]){
-            pwm = -0.5;
-        } else {
-            pwm = 0;
-        }
-        SetValueMotor(i, pwm);
-    }
-    if (button[2]) Shot();
-    if (button[3]) Dribble(0.6);
-}
-
 void Master::Shot()
 {
     shot.outPut();