Ravens Robotics FRC 2015
SmoothAxis.h
Go to the documentation of this file.
1 
9 #ifndef SRC_SMOOTHAXIS_H_
10 #define SRC_SMOOTHAXIS_H_
11 
19 class SmoothAxis {
20 public:
24  SmoothAxis();
25 
29  virtual ~SmoothAxis();
30 
36  void SetTarget( float newTarget );
37 
45  float GetValue( );
46 
52  bool isEnabled();
53 
59  void setEnabled(bool enabled);
60 
61 private:
62  bool m_enabled;
64  const float kAccelVal = 0.01;
65 };
66 
67 
68 
69 #endif /* SRC_SMOOTHAXIS_H_ */
bool isEnabled()
Definition: SmoothAxis.cpp:60
virtual ~SmoothAxis()
Definition: SmoothAxis.cpp:23
float m_target
Definition: SmoothAxis.h:63
float m_prevTarget
current & previous target settings for smoothing algo
Definition: SmoothAxis.h:63
bool m_enabled
=true if smoothing enabled
Definition: SmoothAxis.h:62
void setEnabled(bool enabled)
Definition: SmoothAxis.cpp:67
void SetTarget(float newTarget)
Definition: SmoothAxis.cpp:30
float GetValue()
Definition: SmoothAxis.cpp:47
const float kAccelVal
Acceleration increment: approach target by 1%.
Definition: SmoothAxis.h:64