Smartcar Shield
SmartCar.cpp
Go to the documentation of this file.
1 #include "SmartCar.hpp"
2 
4  Control& control,
5  HeadingSensor& headingSensor,
6  Odometer& odometer)
7  : SimpleCar::SimpleCar(control)
8  , DistanceCar::DistanceCar(runtime, control, odometer)
9  , HeadingCar::HeadingCar(control, headingSensor)
10 {
11 }
12 
14  Control& control,
15  HeadingSensor& headingSensor,
16  Odometer& odometerleft,
17  Odometer& odometerRight)
18  : SimpleCar::SimpleCar(control)
19  , DistanceCar::DistanceCar(runtime, control, odometerleft, odometerRight)
20  , HeadingCar::HeadingCar(control, headingSensor)
21 {
22 }
23 
25 {
28 }
DistanceCar
Definition: DistanceCar.hpp:27
SmartCar::SmartCar
SmartCar(Runtime &runtime, Control &control, HeadingSensor &headingSensor, Odometer &odometer)
Constructs a car equipped with a heading sensor and an odometer.
Definition: SmartCar.cpp:3
HeadingCar
Definition: HeadingCar.hpp:10
Odometer
Definition: Odometer.hpp:26
SmartCar::update
void update() override
Adjusts the speed when cruise control is enabled and calculates the current heading.
Definition: SmartCar.cpp:24
Runtime
Definition: Runtime.hpp:35
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
DistanceCar::update
virtual void update()
Adjusts the cruise control speed.
Definition: DistanceCar.cpp:112
SmartCar.hpp