WPILib 2012
WPILibRoboticsLibraryforFRC
|
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 #ifndef VICTOR_H 00008 #define VICTOR_H 00009 00010 #include "SafePWM.h" 00011 #include "SpeedController.h" 00012 #include "PIDOutput.h" 00013 00017 class Victor : public SafePWM, public SpeedController, public PIDOutput 00018 { 00019 public: 00020 explicit Victor(UINT32 channel); 00021 Victor(UINT8 moduleNumber, UINT32 channel); 00022 virtual ~Victor(); 00023 virtual void Set(float value, UINT8 syncGroup=0); 00024 virtual float Get(); 00025 virtual void Disable(); 00026 00027 virtual void PIDWrite(float output); 00028 00029 private: 00030 void InitVictor(); 00031 }; 00032 00033 #endif 00034