Smartcar Shield
src
motor
Motor.hpp
Go to the documentation of this file.
1
7
#pragma once
8
9
namespace
smartcarlib
10
{
11
namespace
constants
12
{
13
namespace
motor
14
{
15
const
int
kMinMotorSpeed
= -100;
16
const
int
kIdleMotorSpeed
= 0;
17
const
int
kMaxMotorSpeed
= 100;
18
}
// namespace motor
19
}
// namespace constants
20
}
// namespace smartcarlib
21
22
class
Motor
23
{
24
public
:
25
virtual
~Motor
() =
default
;
26
42
virtual
void
setSpeed
(
int
speed) = 0;
43
};
smartcarlib
Definition:
DistanceCar.hpp:11
smartcarlib::constants::motor::kMaxMotorSpeed
const int kMaxMotorSpeed
Definition:
Motor.hpp:17
smartcarlib::constants::motor::kIdleMotorSpeed
const int kIdleMotorSpeed
Definition:
Motor.hpp:16
Motor
Definition:
Motor.hpp:22
smartcarlib::constants::motor::kMinMotorSpeed
const int kMinMotorSpeed
Definition:
Motor.hpp:15
Motor::setSpeed
virtual void setSpeed(int speed)=0
Sets the motor speed and direction as the percentage of the maximum possible speed,...
Motor::~Motor
virtual ~Motor()=default
Generated by
1.8.17