fs
Dependents: ARAI45th 3servotest 1stcomp 3rdcompfixstart ... more
Diff: locate.h
- Revision:
- 4:ecbb45e84c08
- Parent:
- 3:0afbd3f61151
- Child:
- 5:d9857c701310
--- a/locate.h Tue Sep 06 09:31:00 2016 +0000 +++ b/locate.h Wed Sep 07 04:57:39 2016 +0000 @@ -11,7 +11,7 @@ #define PI 3.14159 //π #define RESOLUSION 400 //P/R(分解能) #define DIAMETER 31.8 //タイヤの直径(mm) -#define ROUND_HOSEI 1.04 //角度のズレを補正 +#define ROUND_HOSEI 1.05 //角度のズレを補正 // エンコーダの1ステップあたりの距離(mm) #define LOCATE_STEP (DIAMETER*PI / RESOLUSION) @@ -30,8 +30,14 @@ //最初に一回だけ行う void setup(); +//setupの初期位置指定版 +void setup(int tx, int ty); + //位置情報を更新する。r,lはエンコーダから -void update (); +void update(); + +//update()のprintfなし版 +void update_np(); //xをmm換算して整数値として返す int coordinateX();