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