|
Smartcar Shield
|
#include <Car.hpp>


Public Member Functions | |
| virtual | ~Car ()=default |
| virtual void | setSpeed (float speed)=0 |
| Sets the car's driving speed. More... | |
| virtual void | setAngle (int angle)=0 |
| Set the car's driving angle. More... | |
| virtual void | overrideMotorSpeed (int firstMotorSpeed, int secondMotorSpeed)=0 |
| Set the motor speed individually as a percentage of the motors` total power. More... | |
An interface to programmatically represent any kind of vehicle
|
virtualdefault |
|
pure virtual |
Set the motor speed individually as a percentage of the motors` total power.
Use this with caution.
| firstMotorSpeed | The speed of the motor passed as first argument argument to the car's control class [-100, 100] |
| secondMotorSpeed | The speed of the motor passed as second argument argument to the car's control class [-100, 100] |
Example:
Implemented in DistanceCar, and SimpleCar.
|
pure virtual |
Set the car's driving angle.
| angle | The car's angle in degrees [-90, 90] |
Example:
Implemented in SimpleCar.
|
pure virtual |
Sets the car's driving speed.
| speed | The car's speed |
Implemented in DistanceCar, and SimpleCar.
1.8.17