LRT14
1.0
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
SpeedController.h
1
#ifndef RHESUS_SPEEDCONTROLLER_H_
2
#define RHESUS_SPEEDCONTROLLER_H_
3
4
#include <string>
5
6
#include "../Defines.h"
7
8
#include "NeutralAction.h"
9
10
namespace
Rhesus
11
{
12
namespace
Toolkit
13
{
14
namespace
Control
15
{
16
20
class
SpeedController
21
{
22
public
:
23
explicit
SpeedController
(std::string name)
24
{
25
m_name = name;
26
m_isEnabled =
false
;
27
m_neutralSetting =
NeutralAction::Coast
;
28
}
29
30
virtual
~
SpeedController
()
31
{
32
33
}
34
35
/* Properties/Accessors */
36
std::string Name()
37
{
38
return
m_name;
39
}
40
41
bool
IsEnabled()
42
{
43
return
m_isEnabled;
44
}
45
46
NeutralAction::Enum
NeutralSetting()
47
{
48
return
m_neutralSetting;
49
}
50
51
void
NeutralSetting(
NeutralAction::Enum
setting)
52
{
53
m_neutralSetting = setting;
54
}
55
56
/* Methods */
57
void
Enable()
58
{
59
m_isEnabled =
true
;
60
}
61
62
void
Disable()
63
{
64
m_isEnabled =
false
;
65
}
66
67
virtual
void
SetDutyCycle(
float
f) = 0;
68
69
virtual
void
Update() = 0;
70
71
private
:
72
std::string m_name;
73
74
bool
m_isEnabled;
75
76
NeutralAction::Enum
m_neutralSetting;
77
};
78
79
}
80
}
81
}
82
83
#endif
Rhesus
Toolkit
Control
SpeedController.h
Generated on Tue Feb 11 2014 00:29:47 for LRT14 by
1.8.3