2015-01-16 19:29:55 -05:00
|
|
|
#ifndef ELEVATOR_H
|
|
|
|
#define ELEVATOR_H
|
|
|
|
|
|
|
|
#include "WPILib.h"
|
2015-01-17 13:28:27 -05:00
|
|
|
#include "Commands/PIDSubsystem.h"
|
2015-02-07 13:08:24 -05:00
|
|
|
class Elevator{
|
2015-01-16 20:12:48 -05:00
|
|
|
private:
|
2015-02-02 18:53:02 -05:00
|
|
|
CANTalon *motor;
|
2015-02-01 14:48:01 -05:00
|
|
|
Encoder *elevatorEncoder;
|
2015-01-16 20:46:58 -05:00
|
|
|
static constexpr double kP_real=4, kI_real=.0f, kP_simulation=18, kI_simulation=.2;
|
2015-02-15 07:53:19 -05:00
|
|
|
DigitalInput *elevatorBottom, *elevatorMiddle, *elevatorTop;
|
2015-02-12 21:18:48 -05:00
|
|
|
bool useEncoder;
|
2015-01-16 20:12:48 -05:00
|
|
|
public:
|
|
|
|
Elevator();
|
2015-02-15 07:53:19 -05:00
|
|
|
bool stoppedAtSensor;
|
2015-01-16 20:12:48 -05:00
|
|
|
void InitDefaultCommand();
|
2015-01-16 20:46:58 -05:00
|
|
|
void Run(double);
|
2015-02-02 12:42:18 -05:00
|
|
|
void ResetEncoder();
|
2015-01-31 12:16:02 -05:00
|
|
|
double GetHeight();
|
2015-02-07 13:03:00 -05:00
|
|
|
bool GetElevatorTop();
|
2015-02-15 07:53:19 -05:00
|
|
|
bool GetElevatorMiddle();
|
2015-02-07 13:03:00 -05:00
|
|
|
bool GetElevatorBottom();
|
2015-02-12 21:18:48 -05:00
|
|
|
void SetUseEncoder(bool);
|
|
|
|
bool GetUseEncoder();
|
2015-01-16 19:29:55 -05:00
|
|
|
};
|
|
|
|
#endif
|
2015-02-08 12:26:15 -05:00
|
|
|
// vim: ts=2:sw=2:et
|