基本クラス
Dependents: 300_PS3com Quadrifoglio_PS3COM
Diff: Master.cpp
- Revision:
- 2:9d9681465f4a
- Parent:
- 1:60319e61775d
- Child:
- 3:9b1aefdd251a
--- a/Master.cpp Tue Jun 14 05:01:15 2022 +0000 +++ b/Master.cpp Wed Jun 15 09:32:21 2022 +0000 @@ -5,6 +5,10 @@ ,shot(kicker) ,drib(ESCpin) { + 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); @@ -31,23 +35,22 @@ } else { pwm = 0; } -// md[i].setSpeed(pwm); - SetValueMotor(i, 0.2); + SetValueMotor(i, pwm); } if (button[2]) Shot(); if (button[3]) Dribble(0.6); } - + void Master::Shot() { shot.outPut(); } - + void Master::Dribble(float power) { drib.setspeed(power); } - + void Master::SetValueMotor(int num, double val) { motor[num]->setSpeed(val);