基本クラス
Dependents: 300_PS3com Quadrifoglio_PS3COM
Revision 4:c9ef83cbe905, committed 2022-06-23
- Comitter:
- piroro4560
- Date:
- Thu Jun 23 15:01:48 2022 +0000
- Parent:
- 3:9b1aefdd251a
- Commit message:
- delete PS3_COM; delete OmniWheel
Changed in this revision
Master.cpp | Show annotated file Show diff for this revision Revisions of this file |
Master.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 9b1aefdd251a -r c9ef83cbe905 Master.cpp --- a/Master.cpp Sat Jun 18 08:42:38 2022 +0000 +++ b/Master.cpp Thu Jun 23 15:01:48 2022 +0000 @@ -9,18 +9,11 @@ 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.15); + shot.setkickperiod(Kicker_Period); + shot.setoutputtime(Kicker_OutPutTime); drib.setspeed(0.0); } -void Master::SetPS3Address(bool *button_, uint8_t *trigger_, uint8_t *stick_) -{ - button = button_; - stick = stick_; - trigger = trigger_; -} - void Master::Shot() { shot.outPut();
diff -r 9b1aefdd251a -r c9ef83cbe905 Master.h --- a/Master.h Sat Jun 18 08:42:38 2022 +0000 +++ b/Master.h Thu Jun 23 15:01:48 2022 +0000 @@ -4,49 +4,45 @@ #include "main.h" #include "kohiMD.h" #include "solenoid.h" -#include "omni_wheel.h" #include "esc.h" class Master { public : - /**コンストラクタ - * ピン設定 - */ + /// + /// @fn Master() + /// @brief コンストラクター + /// @detail ピンはmain.hで定義 + /// Master(); - /**PS3のボタンのアドレスをセットする - */ - void SetPS3Address(bool *button_, uint8_t *trigger_, uint8_t *stick_); - - /**一発撃つ - */ + /// + /// @fn Shot() + /// @brief ソレノイドを駆動させる + /// @detail ソレノイドのパワーはmain.hで定義 + /// void Shot(); - /**ドリブルする - */ + /// + /// @fn Dribble(float power) + /// @brief ドリブラーを回す + /// @param power ドリブラの回転速度 + /// void Dribble(float power); - /**モーター出力 - */ + /// + /// @fn SetValueMotor(int num, double val) + /// @brief 足回りモーターを回す + /// @param num 回すモーターの番号 + /// @param val 速度(-1 ~ 1) + /// void SetValueMotor(int num, double val); -// private : +private : BufferedSerial pc; KohiMD *motor[4]; Solenoid shot; RCJESC drib; - - Ticker test; - Ticker PS3com; - OmniWheel omni; - - uint8_t h1,h2; - bool *button; - uint8_t *trigger; - uint8_t *stick; - double pwm = 0.0; - float spin_power; }; #endif \ No newline at end of file