LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
ManagedTalon.h
1 #ifndef RHESUS_MANAGEDTALON_H_
2 #define RHESUS_MANAGEDTALON_H_
3 
4 #include <string>
5 
6 #include <Talon.h>
7 #include <DigitalOutput.h>
8 
9 #include "SpeedController.h"
10 
11 namespace Rhesus
12 {
13 namespace Toolkit
14 {
15 namespace Control
16 {
17 
18 class ManagedTalon : SpeedController
19 {
20 public:
21  ManagedTalon(std::string name, UINT32 port, UINT32 jumperChannel);
22  ManagedTalon(std::string name, UINT8 moduleNumber, UINT32 port, UINT32 jumperChannel);
23  ManagedTalon(std::string name, UINT32 port, UINT8 jumperModuleNumber, UINT32 jumperChannel);
24  ManagedTalon(std::string name, UINT8 moduleNumber, UINT32 port, UINT8 jumperModuleNumber, UINT32 jumperChannel);
25  ~ManagedTalon();
26 
28  Talon& WrappedTalon()
29  {
30  return m_talon;
31  }
32 
33  void SetDutyCycle(float f) OVERRIDE
34  {
35  m_signal = f;
36  }
37 
38  void Update() OVERRIDE;
39 
40 private:
41  Talon m_talon;
42  DigitalOutput* m_jumper;
43 
44  float m_signal;
45 };
46 
47 }
48 }
49 }
50 
51 #endif