Now you can download a copy of these docs so you can use them offline! Download now
SafePWM.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef __SAFE_PWM__
8 #define __SAFE_PWM__
9 
10 #include "MotorSafety.h"
11 #include "PWM.h"
12 
13 class MotorSafetyHelper;
14 
22 class SafePWM: public PWM, public MotorSafety
23 {
24 public:
25  explicit SafePWM(uint32_t channel);
26  SafePWM(uint8_t moduleNumber, uint32_t channel);
27  ~SafePWM();
28 
29  void SetExpiration(float timeout);
30  float GetExpiration();
31  bool IsAlive();
32  void StopMotor();
33  bool IsSafetyEnabled();
34  void SetSafetyEnabled(bool enabled);
35  void GetDescription(char *desc);
36 
37  virtual void SetSpeed(float speed);
38 private:
39  void InitSafePWM();
40  MotorSafetyHelper *m_safetyHelper;
41 };
42 
43 #endif
void SetSafetyEnabled(bool enabled)
Definition: SafePWM.cpp:87
bool IsSafetyEnabled()
Definition: SafePWM.cpp:96
Definition: PWM.h:32
virtual void SetSpeed(float speed)
Definition: SafePWM.cpp:112
bool IsAlive()
Definition: SafePWM.cpp:67
float GetExpiration()
Definition: SafePWM.cpp:57
void StopMotor()
Definition: SafePWM.cpp:77
SafePWM(uint32_t channel)
Definition: SafePWM.cpp:24

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6