k
Dependents: 3rdcompfixstart 2ndcomp 4thcomp 6th33222_copy
Fork of Move by
move.h@13:4501c9202500, 2016-09-11 (annotated)
- Committer:
- choutin
- Date:
- Sun Sep 11 11:39:42 2016 +0000
- Revision:
- 13:4501c9202500
- Parent:
- 7:7f1721542753
- Child:
- 14:138af628d979
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sakanakuuun | 7:7f1721542753 | 1 | #define ALLOW_RAD 0.008 |
sakanakuuun | 1:405e28b64fdb | 2 | #define CW true |
sakanakuuun | 1:405e28b64fdb | 3 | #define CCW false |
choutin | 13:4501c9202500 | 4 | |
sakanakuuun | 2:f25a09c5e113 | 5 | #define X_PLUS 1 |
sakanakuuun | 2:f25a09c5e113 | 6 | #define Y_PLUS 2 |
sakanakuuun | 2:f25a09c5e113 | 7 | #define X_MINUS -1 |
sakanakuuun | 2:f25a09c5e113 | 8 | #define Y_MINUS -2 |
choutin | 13:4501c9202500 | 9 | |
choutin | 13:4501c9202500 | 10 | //モーター初期化 |
choutin | 13:4501c9202500 | 11 | void initmotor(int); |
choutin | 13:4501c9202500 | 12 | |
choutin | 13:4501c9202500 | 13 | //指定速度で動く |
sakanakuuun | 0:d7ff86f25eaa | 14 | void move(int left,int right); |
choutin | 13:4501c9202500 | 15 | |
choutin | 13:4501c9202500 | 16 | //角度の微調整 |
sakanakuuun | 0:d7ff86f25eaa | 17 | void hosei_turn(float pt, bool cw, float rad); |
choutin | 13:4501c9202500 | 18 | |
sakanakuuun | 0:d7ff86f25eaa | 19 | //好きな向きに回転 |
choutin | 13:4501c9202500 | 20 | void turnrad(float rad); |
choutin | 13:4501c9202500 | 21 | |
choutin | 13:4501c9202500 | 22 | //反時計周り |
choutin | 13:4501c9202500 | 23 | void turnrad_cw(float rad, int team); |
choutin | 13:4501c9202500 | 24 | |
choutin | 13:4501c9202500 | 25 | //時計周り |
choutin | 13:4501c9202500 | 26 | void turnrad_ccw(float rad, int team); |
choutin | 13:4501c9202500 | 27 | |
sakanakuuun | 3:cecaa0154f92 | 28 | //好きな場所へ行く |
sakanakuuun | 5:0e18cf25291a | 29 | void pmove(int x, int y); |
choutin | 13:4501c9202500 | 30 | |
choutin | 13:4501c9202500 | 31 | //斜め移動版 |
choutin | 13:4501c9202500 | 32 | void pmove2(int x, int y); |
choutin | 13:4501c9202500 | 33 | |
choutin | 13:4501c9202500 | 34 | //300(mm)x正方向にバック |
sakanakuuun | 6:0aa97a99c9cb | 35 | void back300(); |
choutin | 13:4501c9202500 | 36 | |
choutin | 13:4501c9202500 | 37 | //x負方向にバック |
choutin | 13:4501c9202500 | 38 | void nxback300(); |
choutin | 13:4501c9202500 | 39 | |
choutin | 13:4501c9202500 | 40 | //y正方向にバック |
choutin | 13:4501c9202500 | 41 | void pyback300(int team); |
choutin | 13:4501c9202500 | 42 | |
choutin | 13:4501c9202500 | 43 | //y負方向にバック |
choutin | 13:4501c9202500 | 44 | void nyback300(int team); |
choutin | 13:4501c9202500 | 45 | |
choutin | 13:4501c9202500 | 46 | //一番近い2n*PIを返す |
choutin | 13:4501c9202500 | 47 | float nearPi(float rad); |
choutin | 13:4501c9202500 | 48 | |
choutin | 13:4501c9202500 | 49 | //現在地から(x,y)へのatan。戻り値は -PIからPI |
choutin | 13:4501c9202500 | 50 | float giveatan(int x, int y); |
sakanakuuun | 6:0aa97a99c9cb | 51 | |
choutin | 13:4501c9202500 | 52 | void movelength(int length); |