1 #include "LineTracer.h" 3 LineTracer::LineTracer():
4 forward(30),
turn(0), minus(-1){
7 void LineTracer::runLine(int32_t countL, int32_t countR, int8_t light_value){
8 forward = speedControl.calculateSpeedForPid(countL, countR);
9 turn = turnControl.calculateTurnForPid( forward, light_value ) * minus;
12 void LineTracer::setForward(int8_t setValue){
16 void LineTracer::setTurn(int8_t setValue){
20 int8_t LineTracer::getForward(){
24 int8_t LineTracer::getTurn(){
28 void LineTracer::isLeftsideLine(
bool b){
31 minus = (b ==
true) ? -1 : 1;