LRT13  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
LRTTalon.h
1 #ifndef LRT_TALON_H_
2 #define LRT_TALON_H_
3 
4 #include "Talon.h"
5 #include "LRTSpeedController.h"
6 
7 #include "DigitalOutput.h"
8 #include <vector>
9 
10 using namespace std;
11 
12 class LRTTalon : public Talon, public LRTSpeedController
13 {
14 public:
15  explicit LRTTalon(UINT32 channel, const char* name, UINT32 jumperChannel = 0);
16  LRTTalon(UINT8 moduleNumber, UINT32 channel, const char* name, UINT32 jumperChannel = 0);
17  virtual ~LRTTalon();
18  virtual void SetDutyCycle(float speed);
19  void Set(float speed);
20  virtual float Get();
21  virtual void Disable();
22  virtual void PIDWrite(float output);
23 
24  virtual void ConfigNeutralMode(LRTSpeedController::NeutralMode mode);
25  /*
26  * Writes the values to the Talon.
27  */
28  void Update();
29 
30  virtual const char* GetName();
31 
32  static vector<LRTTalon*> talon_vector;
33 private:
34  const char* m_name;
35  float m_pwm;
36 
37  DigitalOutput* m_brake_jumper;
38  LRTSpeedController::NeutralMode m_neutral;
39 };
40 
41 #endif /* LRT_TALON_H_ */