2015-02-08 16:51:35 -05:00
|
|
|
#ifndef TURN_H
|
|
|
|
#define TURN_H
|
|
|
|
|
|
|
|
#include "Commands/Command.h"
|
|
|
|
#include "../../CommandBase.h"
|
|
|
|
#include "../../DentRobot.h"
|
|
|
|
#include "WPILib.h"
|
|
|
|
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Turns the robot
|
|
|
|
*
|
|
|
|
* Turns the robot until a timeout is reached
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
class Turn: public Command{
|
2015-02-21 08:43:19 -05:00
|
|
|
private:
|
2015-02-08 16:51:35 -05:00
|
|
|
public:
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Constructs Turn
|
|
|
|
*
|
|
|
|
* @param double Timeout in seconds
|
|
|
|
*/
|
2015-03-01 16:48:37 -05:00
|
|
|
Turn(double);
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Initializes the class
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
void Initialize();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Turns the robot
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
void Execute();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Checks if the command is finished
|
|
|
|
*
|
|
|
|
* @return True only if the timeout was reached
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
bool IsFinished();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Sets the drivetrain to stop
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
void End();
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Calls End()
|
|
|
|
*/
|
2015-02-08 16:51:35 -05:00
|
|
|
void Interrupted();
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim: ts=2:sw=2:et
|