|
Smartcar Shield
|
A class to programmatically represent a very basic vehicle with two motors. More...
#include <SimpleCar.hpp>


Public Member Functions | |
| SimpleCar (Control &control) | |
| Constructs a simple car. | |
| void | setSpeed (float speed) override |
| Sets the car's driving speed as a percentage of the motors total speed where the sign indicates direction. | |
| void | setAngle (int angle) override |
| Set the car's driving angle. | |
| void | overrideMotorSpeed (int firstMotorSpeed, int secondMotorSpeed) override |
| Set the motor speed individually as a percentage of the motors` total power. | |
Public Member Functions inherited from Car | |
| virtual | ~Car ()=default |
A class to programmatically represent a very basic vehicle with two motors.
Definition at line 10 of file SimpleCar.hpp.
|
explicit |
Constructs a simple car.
| control | The car's control |
Example:
Definition at line 7 of file SimpleCar.cpp.
|
overridevirtual |
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:
Implements Car.
Reimplemented in SmartCar.
Definition at line 22 of file SimpleCar.cpp.


|
overridevirtual |
Set the car's driving angle.
| angle | The car's angle in degrees [-90, 90] |
Example:
Implements Car.
Definition at line 17 of file SimpleCar.cpp.

|
overridevirtual |
Sets the car's driving speed as a percentage of the motors total speed where the sign indicates direction.
| speed | The car's speed [-100, 100] |
Example:
Implements Car.
Reimplemented in SmartCar.
Definition at line 12 of file SimpleCar.cpp.

