Smartcar Shield
Loading...
Searching...
No Matches
SmartCar.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "../distance/DistanceCar.hpp"
9#include "../heading/HeadingCar.hpp"
10
11class SmartCar : public DistanceCar, public HeadingCar
12{
13public:
39 SmartCar(Runtime& runtime, Control& control, HeadingSensor& headingSensor, Odometer& odometer);
40
70 SmartCar(Runtime& runtime,
71 Control& control,
72 HeadingSensor& headingSensor,
73 Odometer& odometerLeft,
74 Odometer& odometerRight);
75
90 void update() override;
91
92 /* Use the overriden functions from DistanceCar */
95};
96
Interface to generalize all classes that can provide a way to control a Car.
Definition Control.hpp:24
A class to programmatically represent a vehicle equipped with odometers.
void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed) override
Sets the motor speed individually as a percentage of the motors` total power unless cruise control is...
void setSpeed(float speed) override
Sets the car's speed in meters per second if cruise control is enabled otherwise as a percentage of t...
A class to programmatically represent a vehicle equipped with a heading sensor.
A heading sensor is an interface that can represent all sensors which can provide the vehicle's headi...
An interface to programmatically represent all odometers.
Definition Odometer.hpp:27
An interface to serve as a wrapper for the native runtime environment, greatly inspired by the Arduin...
Definition Runtime.hpp:36
A class to programmatically represent a vehicle equipped with odometers and a heading sensor.
Definition SmartCar.hpp:12
void update() override
Adjusts the speed when cruise control is enabled and calculates the current heading.
Definition SmartCar.cpp:24