2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00
dent/Commands/Autonomous/Turn.h

49 lines
918 B
C
Raw Normal View History

#ifndef TURN_H
#define TURN_H
#include "Commands/Command.h"
#include "../../DentRobot.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
*/
class Turn: public Command{
2015-02-21 08:43:19 -05:00
private:
double power; //<! Power to turn (default: 0.6)
public:
2015-03-01 17:19:00 -05:00
/**
* @brief Constructs Turn
*
2015-03-09 10:07:54 -04:00
* @param timeout Timeout in seconds
2015-03-01 17:19:00 -05:00
*/
Turn(double timeout, double pwr=0.6);
2015-03-01 17:19:00 -05:00
/**
* @brief Initializes the class
*/
void Initialize();
2015-03-01 17:19:00 -05:00
/**
* @brief Turns the robot
*/
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
*/
bool IsFinished();
2015-03-01 17:19:00 -05:00
/**
* @brief Sets the drivetrain to stop
*/
void End();
2015-03-01 17:19:00 -05:00
/**
* @brief Calls End()
*/
void Interrupted();
};
#endif
// vim: ts=2:sw=2:et