Smartcar Shield
Loading...
Searching...
No Matches
Car.hpp
Go to the documentation of this file.
1
5#pragma once
6
7class Car
8{
9public:
10 virtual ~Car() = default;
11
16 virtual void setSpeed(float speed) = 0;
17
27 virtual void setAngle(int angle) = 0;
28
42 virtual void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed) = 0;
43};
An interface to programmatically represent any kind of vehicle.
Definition Car.hpp:8
virtual void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed)=0
Set the motor speed individually as a percentage of the motors` total power.
virtual void setAngle(int angle)=0
Set the car's driving angle.
virtual ~Car()=default
virtual void setSpeed(float speed)=0
Sets the car's driving speed.