DeepSpace  2019
Slider.h
Go to the documentation of this file.
1 #ifndef _Slider_HG_
3 #define _Slider_HG_
4 
5 #include <frc/commands/Subsystem.h>
6 #include <networktables/NetworkTable.h>
7 #include <frc/WPILib.h>
8 #include <ctre/Phoenix.h>
9 #include "RobotMap.h"
10 #include <Commands/ControlSlider.h>
11 #include <frc/DigitalInput.h>
12 
13 class Slider : public frc::Subsystem {
14  public:
15  Slider();
16  void InitDefaultCommand() override;
17 
23  void Slide(double speed);
24 
25  void Center();
26  private:
27  double sliderSide;
28  can::WPI_TalonSRX* pSliderMotor;
29  frc::DigitalInput* pLeftHall;
30  frc::DigitalInput* pRightHall;
31  frc::DigitalInput* pCenterHall;
32  std::shared_ptr<NetworkTable> ntTelemetry;
33 };
34 
35 #endif // _Slider_HG_
frc::DigitalInput * pLeftHall
Definition: Slider.h:29
std::shared_ptr< NetworkTable > ntTelemetry
A pointer to the /SmartDashboard/Telemetry table.
Definition: Slider.h:32
Slider()
Class constructor.
Definition: Slider.cpp:4
void Center()
Definition: Slider.cpp:53
frc::DigitalInput * pRightHall
Definition: Slider.h:30
void InitDefaultCommand() override
Initalizes the default command for this subsystem (ControlSlider)
Definition: Slider.cpp:23
frc::DigitalInput * pCenterHall
Definition: Slider.h:31
void Slide(double speed)
Definition: Slider.cpp:27
double sliderSide
Definition: Slider.h:27
can::WPI_TalonSRX * pSliderMotor
Pointer for the slider motor.
Definition: Slider.h:28
A subsystem that interfaces with the drivebase on the robot.
Definition: Slider.h:13