2015-10-09 17:44:30 +00:00
|
|
|
#ifndef ENABLECOMPRESSOR_H
|
|
|
|
#define ENABLECOMPRESSOR_H
|
|
|
|
|
|
|
|
#include "Commands/Command.h"
|
|
|
|
#include "WPILib.h"
|
|
|
|
|
|
|
|
/**
|
2015-10-10 06:51:23 +00:00
|
|
|
* @brief allows the compressor to run if the system is within the psi threshold
|
2015-10-09 17:44:30 +00:00
|
|
|
*/
|
|
|
|
class EnableCompressor: public Command {
|
|
|
|
private:
|
|
|
|
bool softLimits;
|
|
|
|
double speed;
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Constructs EnableCompressor
|
|
|
|
*
|
|
|
|
* @param timeout Timeout in seconds (default: 3.5)
|
|
|
|
*/
|
|
|
|
EnableCompressor(double timeout = 3.5);
|
|
|
|
/**
|
|
|
|
* @brief Initializes the class
|
|
|
|
*/
|
|
|
|
void Initialize();
|
|
|
|
/**
|
2015-10-10 06:51:23 +00:00
|
|
|
* @brief EnableCompressors sets the compressor to enabled
|
2015-10-09 17:44:30 +00:00
|
|
|
*/
|
|
|
|
void Execute();
|
|
|
|
/**
|
|
|
|
* @brief Checks if the command is finished
|
|
|
|
*
|
2015-10-10 06:51:23 +00:00
|
|
|
* @return True if the timeout was reached
|
2015-10-09 17:44:30 +00:00
|
|
|
*/
|
|
|
|
bool IsFinished();
|
|
|
|
/**
|
2015-10-10 06:51:23 +00:00
|
|
|
* @brief required for the command
|
2015-10-09 17:44:30 +00:00
|
|
|
*/
|
|
|
|
void End();
|
|
|
|
/**
|
|
|
|
* @brief Calls End()
|
|
|
|
*/
|
|
|
|
void Interrupted();
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim: ts=2:sw=2:et
|