etrobocon2018 feat.KatLab  770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
 全て クラス 名前空間 ファイル 関数 変数 列挙型 列挙値 フレンド マクロ定義 ページ
LineTracerWalker.cpp
[詳解]
1 #include "LineTracerWalker.h"
2 
3 LineTracerWalker::LineTracerWalker() : minus(-1), forward(30), turn(0) {}
4 
5 void LineTracerWalker::runLine(int32_t countL, int32_t countR, int16_t light_value)
6 {
7  forward = speedControl.calculateSpeedForPid(countL, countR);
9 }
10 
11 void LineTracerWalker::setForward(int8_t setValue)
12 {
13  forward = setValue;
14 }
15 
16 void LineTracerWalker::setTurn(int8_t setValue)
17 {
18  turn = setValue;
19 }
20 
22 {
23  return forward;
24 }
25 
27 {
28  return turn;
29 }
30 
32 {
33  // Trueのときは線の左側なので-1
34  // Falseのときは線の右側なので+1
35  minus = (b == true) ? -1 : 1;
36 }
std::int8_t calculateTurnForPid(std::int8_t forward, std::int16_t light_value)
Definition: TurnControl.cpp:11
void isLeftsideLine(bool b)
void setForward(int8_t setValue)
std::int32_t calculateSpeedForPid(std::int32_t curAngleL, std::int32_t curAngleR)
void runLine(int32_t countL, int32_t countR, int16_t light_value)
TurnControl turnControl
void setTurn(int8_t setValue)
SpeedControl speedControl