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:
29  HeadingCar(Control& control, HeadingSensor& headingSensor);
30 
40  int getHeading();
41 
56  virtual void update();
57 
58 private:
59  HeadingSensor& mHeadingSensor;
60 };
61 
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