etrobocon2018 feat.KatLab  770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
 全て クラス 名前空間 ファイル 関数 変数 列挙型 列挙値 フレンド マクロ定義 ページ
LeftNormalCourse.h
[詳解]
1 
7 #ifndef __LEFTNORMALCOURSE__
8 #define __LEFTNORMALCOURSE__
9 
10 #include "NormalCourse.h"
11 
15 enum struct LeftStatus {
16  STRAIGHT,
18  CURVE_LEFT,
22  EDGE_RESET,
25  START,
26  STOP,
27 };
28 
33  public:
36 
41  bool runNormalCourse(int32_t countL, int32_t countR, int16_t light_value,
42  int16_t target_brightness);
43 
50  bool statusCheck(int32_t countL, int32_t countR);
51 
56  int getStatus();
57 
58  private:
59  LeftStatus status;
60  LeftStatus old_status;
61  bool isChangedEdge;
62  int16_t time_count;
63 
64  const std::int16_t CALIBRATE_DISTANCE_L = 300;
65  const std::int16_t FIRST_STRAIGHT_DISTANCE_L = 2850;
66  const std::int16_t FIRST_CURVE_DISTANCE_L = 4950;
67  const std::int16_t SECOND_STRAIGHT_DISTANCE_L = 6600;
68  const std::int16_t SECOND_CURVE_DISTANCE_L = 7500;
69  const std::int16_t THIRD_STRAIGHT_DISTANCE_L = 7900;
70  const std::int16_t THIRD_CURVE_DISTANCE_L = 9600;
71  const std::int16_t FOURTH_STRAIGHT_DISTANCE_L = 12000;
72 };
73 
74 #endif
bool runNormalCourse(int32_t countL, int32_t countR, int16_t light_value, int16_t target_brightness)
bool statusCheck(int32_t countL, int32_t countR)
LeftStatus