2015-01-16 19:29:55 -05:00
|
|
|
#ifndef LOWER_H
|
|
|
|
#define LOWER_H
|
|
|
|
|
2015-01-17 12:55:51 -05:00
|
|
|
#include "Commands/Command.h"
|
2015-01-16 19:29:55 -05:00
|
|
|
#include "WPILib.h"
|
|
|
|
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Lowers the elevator until a timeout is reached
|
|
|
|
*/
|
2015-01-17 12:55:51 -05:00
|
|
|
class Lower: public Command{
|
2015-01-16 20:12:48 -05:00
|
|
|
public:
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Constructs Lower
|
|
|
|
*/
|
2015-03-10 20:49:32 -04:00
|
|
|
Lower(double timeout=3.0);
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Initializes the class
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
void Initialize();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Lowers the elevator at -1.0 power
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
void Execute();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Checks if the command is finished
|
|
|
|
*
|
|
|
|
* @return True if the timeout was reached or if the bottom elevator sensor was triggered
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
bool IsFinished();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Sets the elevator to stop
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
void End();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Calls End()
|
|
|
|
*/
|
2015-01-16 20:12:48 -05:00
|
|
|
void Interrupted();
|
2015-01-16 19:29:55 -05:00
|
|
|
};
|
|
|
|
#endif
|
2015-02-08 12:26:15 -05:00
|
|
|
// vim: ts=2:sw=2:et
|