9 : controller(controller_),
49 char cameraMode[8] =
"ON";
54 std::strcpy(cameraMode,
"ON");
56 std::strcpy(cameraMode,
"OFF");
61 isCameraMode = !isCameraMode;
75 char course[8] =
"Left";
80 std::strcpy(course,
"Left");
82 std::strcpy(course,
"Right");
101 char name[8] =
"none";
104 std::strcpy(name,
"White");
106 std::strcpy(name,
"Black");
129 brightnessOfWhite = averageBrightness();
131 brightnessOfBlack = averageBrightness();
137 int Calibrator::averageBrightness()
140 int meanBrightness = 0;
142 for(
int i = 0; i < times; i++) {
147 return meanBrightness / times;
162 return brightnessOfWhite;
167 return brightnessOfBlack;
Calibrator(Controller &controller_)
bool isLeftCourse() const
int getBlackBrightness() const
bool buttonIsPressedLeft()
static void print(int row, const char *format,...)
bool buttonIsPressedRight()
static void speakerPlayToneFS6(int duration)
bool setBrightness(Brightness brightness)
static void tslpTsk(int time)
bool calibration()
falseが返ってきた場合、エラーメッセージがLCDに出ます。スタートを取りやめ、原因をさぐってください。 ...
bool buttonIsPressedEnter()
int getWhiteBrightness() const
bool getCameraMode() const