mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
48 lines
852 B
C++
48 lines
852 B
C++
#ifndef TURN_H
|
|
#define TURN_H
|
|
|
|
#include "Commands/Command.h"
|
|
#include "../../CommandBase.h"
|
|
#include "../../DentRobot.h"
|
|
#include "WPILib.h"
|
|
|
|
/**
|
|
* @brief Turns the robot
|
|
*
|
|
* Turns the robot until a timeout is reached
|
|
*/
|
|
class Turn: public Command{
|
|
private:
|
|
public:
|
|
/**
|
|
* @brief Constructs Turn
|
|
*
|
|
* @param timeout Timeout in seconds
|
|
*/
|
|
Turn(double timeout);
|
|
/**
|
|
* @brief Initializes the class
|
|
*/
|
|
void Initialize();
|
|
/**
|
|
* @brief Turns the robot
|
|
*/
|
|
void Execute();
|
|
/**
|
|
* @brief Checks if the command is finished
|
|
*
|
|
* @return True only if the timeout was reached
|
|
*/
|
|
bool IsFinished();
|
|
/**
|
|
* @brief Sets the drivetrain to stop
|
|
*/
|
|
void End();
|
|
/**
|
|
* @brief Calls End()
|
|
*/
|
|
void Interrupted();
|
|
};
|
|
#endif
|
|
// vim: ts=2:sw=2:et
|