Now you can download a copy of these docs so you can use them offline! Download now
GearTooth.cpp
00001 /*----------------------------------------------------------------------------*/ 00002 /* Copyright (c) FIRST 2008. All Rights Reserved. */ 00003 /* Open Source Software - may be modified and shared by FRC teams. The code */ 00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ 00005 /*----------------------------------------------------------------------------*/ 00006 00007 #include "GearTooth.h" 00008 00009 const double GearTooth::kGearToothThreshold; 00010 00014 void GearTooth::EnableDirectionSensing(bool directionSensitive) 00015 { 00016 if (directionSensitive) 00017 { 00018 SetPulseLengthMode(kGearToothThreshold); 00019 } 00020 } 00021 00030 GearTooth::GearTooth(UINT32 channel, bool directionSensitive) 00031 : Counter(channel) 00032 { 00033 EnableDirectionSensing(directionSensitive); 00034 } 00035 00043 GearTooth::GearTooth(UINT8 moduleNumber, UINT32 channel, bool directionSensitive) 00044 : Counter(moduleNumber, channel) 00045 { 00046 EnableDirectionSensing(directionSensitive); 00047 } 00048 00056 GearTooth::GearTooth(DigitalSource *source, bool directionSensitive) 00057 : Counter(source) 00058 { 00059 EnableDirectionSensing(directionSensitive); 00060 } 00061 00062 GearTooth::GearTooth(DigitalSource &source, bool directionSensitive): Counter(source) 00063 { 00064 EnableDirectionSensing(directionSensitive); 00065 } 00066 00070 GearTooth::~GearTooth() 00071 { 00072 } 00073
Generated on Thu Jan 12 2012 22:35:20 for WPILibC++ by
1.7.1