ETrobocon2017 - 片山研究所モデルベース開発推進事業部
Walker.h
[詳解]
1 #ifndef __WALKER__
2 #define __WALKER__
3 
4 #include "Motor.h"
5 #include "Clock.h"
6 #include "util.h"
7 
8 using namespace ev3api;
9 
10 class Walker {
11 public:
12  Walker();
13  void stop();
14  void run(int8_t pwm, int8_t turn);
15  int edgeChange();
16  void moveAngle(int8_t pwm, int angle);
17  void angleChange(int angle, int rotation);
18  int32_t get_count_L();
19  int32_t get_count_R();
20  void init();
21  void terminate();
22  void reset();
23  void setBrakeMotor(bool brake);
24 
25 private:
26  Motor leftWheel;
27  Motor rightWheel;
28  Clock clock;
29  int8_t leftRight = 1; // 1 -> 右, -1 -> 左
30 };
31 
32 
33 #endif
Definition: Clock.h:12
void run(Navigation &navi, float goal_x, float goal_y, bool)
Definition: Walker.h:10