14 : controller(controller_), isLeftCourse(isLeftCourse_), targetBrightness(targetBrightness_)
24 isLeftCourse = isLeftCourse_;
34 constexpr
int arraySize = 7;
36 std::array<NormalCourseProperty, arraySize> normalCourseProperty
42 { 600, baseSpeed, { 0.1, 0.0, 0.1 }, { 0.9, 0.01, 0.06 } },
43 { 800, baseSpeed - 50, { 1.5, 0.0, 0.1 }, { 1.1, 0.01, 0.07 } },
44 { 1200, baseSpeed - 180, { 0.3, 0.0, 0.1 }, { 1.1, 0.01, 0.05 } },
45 { 2300, baseSpeed, { 0.1, 0.0, 0.1 }, { 1.2, 0.01, 0.05 } },
46 { 1000, baseSpeed + 100, { 0.1, 0.0, 0.1 }, { 0.9, 0.01, 0.04 } },
47 { 1300, baseSpeed + 100, { 2.0, 0.0, 0.1 }, { 1.0, 0.01, 0.05 } },
48 { 2500, baseSpeed + 50, { 0.1, 0.0, 0.1 }, { 1.1, 0.01, 0.05 } },
50 LineTracer lineTracer(controller, targetBrightness, isLeftCourse);
51 for(
auto& ncp : normalCourseProperty) {
71 return targetBrightness;
void run(NormalCourseProperty &settings)
走行距離や目標スピード、スピード制御PID、回転制御PIDを NormalCourseProperty 構造体を使用し渡す。 ...
static void speakerPlayToneFS6(int duration)
bool getIsLeftCourse() const
NormalCourse(Controller &controller_, bool isLeftCourse_, int targetBrightness_)
int getTargetBrightness() const
void setIsLeftCourse(bool isLeftCourse_)