2
0
mirror of https://github.com/team2059/Dent synced 2024-12-28 21:02:30 -05:00
dent/Subsystems/Elevator.h

74 lines
1.7 KiB
C
Raw Normal View History

2015-01-16 19:29:55 -05:00
#ifndef ELEVATOR_H
#define ELEVATOR_H
#include "WPILib.h"
2015-03-09 09:48:18 -04:00
/**
* @brief The main elevator for lifting totes
*/
2015-02-07 13:08:24 -05:00
class Elevator{
2015-01-16 20:12:48 -05:00
private:
2015-03-09 09:48:18 -04:00
CANTalon *motor; //<! The elevator motor
Encoder *elevatorEncoder; //<! The elevator encoder (unused)
DigitalInput *elevatorBottom, //<! The bottom elevator sensor
*elevatorMiddle, //<! The middle elevator sensor
*elevatorTop; //<! The top elevator sensor
2015-03-10 19:46:43 -04:00
bool useEncoder; //<! Use the elevator encoder (unused)
2015-01-16 20:12:48 -05:00
public:
2015-03-09 09:48:18 -04:00
/**
* @brief Constructs Elevator
*/
2015-01-16 20:12:48 -05:00
Elevator();
2015-03-09 09:48:18 -04:00
/**
* @brief No action
*/
2015-01-16 20:12:48 -05:00
void InitDefaultCommand();
2015-03-09 09:48:18 -04:00
/**
* @brief Runs the elevator
*
* @param power The power to run the bin elevator (-1.0 to 1.0)
2015-03-09 09:48:18 -04:00
*/
void Run(double power);
2015-03-09 09:48:18 -04:00
/**
* @brief Sets the encoder value to 0 (unused)
*/
void ResetEncoder();
2015-03-09 09:48:18 -04:00
/**
2015-03-10 19:46:43 -04:00
* @brief Gets the height of the elevator
2015-03-09 09:48:18 -04:00
*
* @return The hight of the elevator
*/
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
*/
bool GetElevatorTop();
2015-03-09 09:48:18 -04:00
/**
* @brief Gets the status of the middle sensor
*
* @return True if the sensor is activated
*/
2015-02-15 07:53:19 -05:00
bool GetElevatorMiddle();
2015-03-09 09:48:18 -04:00
/**
* @brief Gets the status of the bottom sensor
*
* @return True if the sensor is activated
*/
bool GetElevatorBottom();
2015-03-09 09:48:18 -04:00
/**
* @brief Use the elevator encoder (unused)
*
* @param use State to use encoder
2015-03-09 09:48:18 -04:00
*/
void SetUseEncoder(bool use);
2015-03-09 09:48:18 -04:00
/**
* @brief Gets the state of useEncoder (unused)
*
* @return State of useEncoder
*/
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