etrobocon2018 feat.KatLab  770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
 全て クラス 名前空間 ファイル 関数 変数 列挙型 列挙値 フレンド マクロ定義 ページ
Walker.h
[詳解]
1 #ifndef __WALKER__
2 #define __WALKER__
3 
4 #include "Controller.h"
5 #include <cstdint>
6 
7 class Walker {
8  public:
9  Walker() = default;
10  explicit Walker(Controller& controller_) : controller(controller_) { reset(); }
11  void stop();
12  void run(std::int8_t pwm, std::int8_t turn);
13  int edgeChange();
14  void moveAngle(std::int8_t pwm, int angle);
15  void angleChange(int angle, int rotation);
16  std::int32_t get_count_L();
17  std::int32_t get_count_R();
18  void init();
19  void terminate();
20  void reset();
21  void setBrakeMotor(bool brake);
22 
23  private:
24  Controller controller;
25  std::int8_t leftRight = 1; // 1 -> 右, -1 -> 左
26 };
27 
28 #endif
void stop()
Definition: Walker.cpp:21
int edgeChange()
Definition: Walker.cpp:59
void setBrakeMotor(bool brake)
Definition: Walker.cpp:41
void init()
Definition: Walker.cpp:3
void angleChange(int angle, int rotation)
Definition: Walker.cpp:101
Walker(Controller &controller_)
Definition: Walker.h:10
void run(std::int8_t pwm, std::int8_t turn)
Definition: Walker.cpp:30
void terminate()
Definition: Walker.cpp:8
Walker()=default
void reset()
Definition: Walker.cpp:15
std::int32_t get_count_R()
Definition: Walker.cpp:54
Definition: Walker.h:7
void moveAngle(std::int8_t pwm, int angle)
Definition: Walker.cpp:77
std::int32_t get_count_L()
Definition: Walker.cpp:49