Smartcar Shield
HeadingCar.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "../../sensors/heading/HeadingSensor.hpp"
8 #include "../simple/SimpleCar.hpp"
9 
10 class HeadingCar : virtual public SimpleCar
11 {
12 public:
30  HeadingCar(Control& control, HeadingSensor& headingSensor);
31 
41  int getHeading();
42 
57  virtual void update();
58 
59 private:
60  HeadingSensor& mHeadingSensor;
61 };
62 
HeadingCar
Definition: HeadingCar.hpp:10
HeadingCar::HeadingCar
HeadingCar(Control &control, HeadingSensor &headingSensor)
Constructs a car equipped with a heading sensor.
Definition: HeadingCar.cpp:3
Control
Definition: Control.hpp:23
HeadingSensor
Definition: HeadingSensor.hpp:8
HeadingCar::update
virtual void update()
Updates the readings from the heading sensor.
Definition: HeadingCar.cpp:14
SimpleCar
Definition: SimpleCar.hpp:10
HeadingCar::getHeading
int getHeading()
Returns the car's current heading in degrees [0, 360)
Definition: HeadingCar.cpp:9