基本クラス
Dependents: 300_PS3com Quadrifoglio_PS3COM
Master.h@4:c9ef83cbe905, 2022-06-23 (annotated)
- Committer:
- piroro4560
- Date:
- Thu Jun 23 15:01:48 2022 +0000
- Revision:
- 4:c9ef83cbe905
- Parent:
- 3:9b1aefdd251a
delete PS3_COM; delete OmniWheel
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
piroro4560 | 0:e2da5742a718 | 1 | #ifndef MASTER_H |
piroro4560 | 0:e2da5742a718 | 2 | #define MASTER_H |
piroro4560 | 0:e2da5742a718 | 3 | |
piroro4560 | 0:e2da5742a718 | 4 | #include "main.h" |
piroro4560 | 0:e2da5742a718 | 5 | #include "kohiMD.h" |
piroro4560 | 0:e2da5742a718 | 6 | #include "solenoid.h" |
piroro4560 | 0:e2da5742a718 | 7 | #include "esc.h" |
piroro4560 | 0:e2da5742a718 | 8 | |
piroro4560 | 0:e2da5742a718 | 9 | class Master |
piroro4560 | 0:e2da5742a718 | 10 | { |
piroro4560 | 0:e2da5742a718 | 11 | public : |
piroro4560 | 4:c9ef83cbe905 | 12 | /// |
piroro4560 | 4:c9ef83cbe905 | 13 | /// @fn Master() |
piroro4560 | 4:c9ef83cbe905 | 14 | /// @brief コンストラクター |
piroro4560 | 4:c9ef83cbe905 | 15 | /// @detail ピンはmain.hで定義 |
piroro4560 | 4:c9ef83cbe905 | 16 | /// |
piroro4560 | 0:e2da5742a718 | 17 | Master(); |
piroro4560 | 0:e2da5742a718 | 18 | |
piroro4560 | 4:c9ef83cbe905 | 19 | /// |
piroro4560 | 4:c9ef83cbe905 | 20 | /// @fn Shot() |
piroro4560 | 4:c9ef83cbe905 | 21 | /// @brief ソレノイドを駆動させる |
piroro4560 | 4:c9ef83cbe905 | 22 | /// @detail ソレノイドのパワーはmain.hで定義 |
piroro4560 | 4:c9ef83cbe905 | 23 | /// |
piroro4560 | 0:e2da5742a718 | 24 | void Shot(); |
piroro4560 | 0:e2da5742a718 | 25 | |
piroro4560 | 4:c9ef83cbe905 | 26 | /// |
piroro4560 | 4:c9ef83cbe905 | 27 | /// @fn Dribble(float power) |
piroro4560 | 4:c9ef83cbe905 | 28 | /// @brief ドリブラーを回す |
piroro4560 | 4:c9ef83cbe905 | 29 | /// @param power ドリブラの回転速度 |
piroro4560 | 4:c9ef83cbe905 | 30 | /// |
piroro4560 | 0:e2da5742a718 | 31 | void Dribble(float power); |
piroro4560 | 0:e2da5742a718 | 32 | |
piroro4560 | 4:c9ef83cbe905 | 33 | /// |
piroro4560 | 4:c9ef83cbe905 | 34 | /// @fn SetValueMotor(int num, double val) |
piroro4560 | 4:c9ef83cbe905 | 35 | /// @brief 足回りモーターを回す |
piroro4560 | 4:c9ef83cbe905 | 36 | /// @param num 回すモーターの番号 |
piroro4560 | 4:c9ef83cbe905 | 37 | /// @param val 速度(-1 ~ 1) |
piroro4560 | 4:c9ef83cbe905 | 38 | /// |
piroro4560 | 0:e2da5742a718 | 39 | void SetValueMotor(int num, double val); |
piroro4560 | 0:e2da5742a718 | 40 | |
piroro4560 | 4:c9ef83cbe905 | 41 | private : |
piroro4560 | 0:e2da5742a718 | 42 | BufferedSerial pc; |
piroro4560 | 0:e2da5742a718 | 43 | KohiMD *motor[4]; |
piroro4560 | 0:e2da5742a718 | 44 | Solenoid shot; |
piroro4560 | 0:e2da5742a718 | 45 | RCJESC drib; |
piroro4560 | 0:e2da5742a718 | 46 | }; |
piroro4560 | 0:e2da5742a718 | 47 | |
piroro4560 | 0:e2da5742a718 | 48 | #endif |