2015-01-11 16:02:49 -05:00
|
|
|
#ifndef COLLECTOR_H
|
|
|
|
#define COLLECTOR_H
|
|
|
|
|
|
|
|
#include "WPILib.h"
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
|
|
|
* @brief Collects totes
|
|
|
|
*
|
|
|
|
* Uses four motors, two on the sides, one on the bottom, and one on the ramp to collect and eject totes
|
|
|
|
*/
|
2015-03-08 21:27:33 -04:00
|
|
|
class Collector: public Subsystem{
|
2015-01-16 20:12:48 -05:00
|
|
|
private:
|
2015-03-02 08:28:03 -05:00
|
|
|
CANTalon *collectorMotorLeft, //<! Left collector motor
|
2015-03-10 19:46:43 -04:00
|
|
|
*collectorMotorBottom, //<! Bottom collector motor
|
|
|
|
*collectorMotorRamp, //<! Ramp collector motor
|
2015-03-02 08:28:03 -05:00
|
|
|
*collectorMotorRight; //<! Right collector motor
|
|
|
|
/**
|
2015-03-09 09:48:18 -04:00
|
|
|
* @brief Analog input for sonar (unused)
|
2015-03-02 08:28:03 -05:00
|
|
|
*/
|
2015-02-15 07:53:19 -05:00
|
|
|
AnalogInput *sonarAnalog;
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
2015-03-09 09:48:18 -04:00
|
|
|
* @brief Digital output for sonar (unused)
|
2015-03-02 08:28:03 -05:00
|
|
|
*/
|
2015-02-15 07:53:19 -05:00
|
|
|
DigitalOutput *sonarDigital;
|
2015-01-16 20:12:48 -05:00
|
|
|
public:
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
|
|
|
* @brief Constructs Collector
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
Collector();
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
|
|
|
* @brief No action
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
void InitDefaultCommand();
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
|
|
|
* @brief Moves the collectors
|
|
|
|
*
|
2015-03-23 10:52:02 -04:00
|
|
|
* @param power The power to run the collectors
|
2015-03-02 08:28:03 -05:00
|
|
|
*/
|
2015-03-10 20:49:32 -04:00
|
|
|
void MoveRollers(double power);
|
2015-03-21 10:24:33 -04:00
|
|
|
/**
|
|
|
|
* @brief Moves the left roller
|
|
|
|
*
|
2015-03-23 10:52:02 -04:00
|
|
|
* @param power The power to run the left roller
|
2015-03-21 10:24:33 -04:00
|
|
|
*/
|
|
|
|
void MoveLeftRoller(double power);
|
|
|
|
/**
|
|
|
|
* @brief Moves the right roller
|
|
|
|
*
|
2015-03-23 10:52:02 -04:00
|
|
|
* @param power The power to run the right roller
|
2015-03-21 10:24:33 -04:00
|
|
|
*/
|
|
|
|
void MoveRightRoller(double power);
|
|
|
|
/**
|
|
|
|
* @brief Moves the bottom rollers
|
|
|
|
*
|
2015-03-23 10:52:02 -04:00
|
|
|
* @param power The power to run the bottom rollers
|
2015-03-21 10:24:33 -04:00
|
|
|
*/
|
|
|
|
void MoveBottomRollers(double power);
|
2015-03-02 08:28:03 -05:00
|
|
|
/**
|
2015-03-09 09:48:18 -04:00
|
|
|
* @brief Gets the distance of the sonar (unused)
|
2015-03-02 08:28:03 -05:00
|
|
|
*
|
|
|
|
* @return The sonar distance
|
|
|
|
*/
|
2015-02-15 17:10:20 -05:00
|
|
|
double GetSonarDistance();
|
2015-01-11 16:02:49 -05:00
|
|
|
};
|
|
|
|
#endif
|
2015-02-08 12:26:15 -05:00
|
|
|
// vim: ts=2:sw=2:et
|