WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
GearTooth.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 GEAR_TOOTH_H_
8 #define GEAR_TOOTH_H_
9 
10 #include "Counter.h"
11 
18 class GearTooth : public Counter
19 {
20 public:
22  static constexpr double kGearToothThreshold = 55e-6;
23  GearTooth(uint32_t channel, bool directionSensitive = false);
24  GearTooth(uint8_t moduleNumber, uint32_t channel, bool directionSensitive = false);
25  GearTooth(DigitalSource *source, bool directionSensitive = false);
26  GearTooth(DigitalSource &source, bool directionSensitive = false);
27  virtual ~GearTooth();
28  void EnableDirectionSensing(bool directionSensitive);
29 
30  virtual std::string GetSmartDashboardType();
31 };
32 
33 
34 #endif
static constexpr double kGearToothThreshold
55 uSec for threshold
Definition: GearTooth.h:22
GearTooth(uint32_t channel, bool directionSensitive=false)
Definition: GearTooth.cpp:31
Definition: DigitalSource.h:19
Definition: Counter.h:21
Definition: GearTooth.h:18
virtual ~GearTooth()
Definition: GearTooth.cpp:72
void EnableDirectionSensing(bool directionSensitive)
Definition: GearTooth.cpp:15