|
Smartcar Shield
|
#include <SimpleCar.hpp>


Public Member Functions | |
| SimpleCar (Control &control) | |
| Constructs a simple car. More... | |
| void | setSpeed (float speed) override |
| Sets the car's driving speed as a percentage of the motors total speed where the sign indicates direction. More... | |
| void | setAngle (int angle) override |
| Set the car's driving angle. More... | |
| void | overrideMotorSpeed (int firstMotorSpeed, int secondMotorSpeed) override |
| Set the motor speed individually as a percentage of the motors` total power. More... | |
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.
| SimpleCar::SimpleCar | ( | Control & | control | ) |
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.
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.
Definition at line 12 of file SimpleCar.cpp.


1.8.17