Smartcar Shield
src
control
ackerman
AckermanControl.hpp
Go to the documentation of this file.
1
6
#pragma once
7
8
#include "../Control.hpp"
9
#include "../../motor/Motor.hpp"
10
11
class
AckermanControl
:
public
Control
12
{
13
public
:
26
AckermanControl
(
Motor
& steering,
Motor
& throttling);
27
28
/* Check `Control` interface for documentation */
29
void
setAngle
(
int
angle)
override
;
30
31
/* Check `Control` interface for documentation */
32
void
setSpeed
(
int
speed)
override
;
33
34
/* Check `Control` interface for documentation */
35
void
overrideMotorSpeed
(
int
firstMotorSpeed,
int
secondMotorSpeed)
override
;
36
37
private
:
38
Motor
& mSteering;
39
Motor
& mThrottling;
40
};
AckermanControl::overrideMotorSpeed
void overrideMotorSpeed(int firstMotorSpeed, int secondMotorSpeed) override
Set the motor speed individually as a percentage of the motors` total power.
Definition:
AckermanControl.cpp:31
Motor
Definition:
Motor.hpp:22
Control
Definition:
Control.hpp:23
AckermanControl::setAngle
void setAngle(int angle) override
Sets the driving angle in degrees [-90, 90].
Definition:
AckermanControl.cpp:15
AckermanControl
Definition:
AckermanControl.hpp:11
AckermanControl::AckermanControl
AckermanControl(Motor &steering, Motor &throttling)
Constructs an Ackerman way of controlling the vehicle.
Definition:
AckermanControl.cpp:9
AckermanControl::setSpeed
void setSpeed(int speed) override
Sets the driving speed as percentage of the total motor speed where the sign represents the direction...
Definition:
AckermanControl.cpp:25
Generated by
1.8.17