2015-02-10 20:12:41 -05:00
|
|
|
#ifndef BINELEVATOR_H
|
|
|
|
#define BINELEVATOR_H
|
|
|
|
|
|
|
|
#include "WPILib.h"
|
|
|
|
#include "Commands/PIDSubsystem.h"
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Controls the bin elevator
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
class BinElevator{
|
|
|
|
private:
|
2015-03-09 18:23:28 -04:00
|
|
|
Victor *motor; //<! The bin elevator motor
|
2015-03-09 09:48:18 -04:00
|
|
|
Encoder *elevatorEncoder; //<! The bin elevator encoder (unused)
|
|
|
|
DigitalInput *elevatorBottom, //<! The bottom bin elevator sensor (unused)
|
|
|
|
*elevatorTop; //<! The top bin elevator sensor (unuesd)
|
2015-02-10 20:12:41 -05:00
|
|
|
public:
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Constructs BinElevator
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
BinElevator();
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief No action
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
void InitDefaultCommand();
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Runs the bin elevator
|
|
|
|
*
|
|
|
|
* @param double The power to run the bin elevator
|
|
|
|
*
|
|
|
|
* Ranges from -1.0 to 1.0
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
void Run(double);
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Sets the encoder value to 0 (unused)
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
void ResetEncoder();
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Gets the height of the bin elevator
|
|
|
|
*
|
|
|
|
* @return The height of the bin elevator
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
double GetHeight();
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Gets the status of the top sensor
|
|
|
|
*
|
|
|
|
* @return True if the sensor is activated
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
bool GetElevatorTop();
|
2015-03-09 09:48:18 -04:00
|
|
|
/**
|
|
|
|
* @brief Gets the status of the bottom sensor
|
|
|
|
*
|
|
|
|
* @return True if the sensor is activated
|
|
|
|
*/
|
2015-02-10 20:12:41 -05:00
|
|
|
bool GetElevatorBottom();
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim: ts=2:sw=2:et
|