mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
47 lines
852 B
C++
47 lines
852 B
C++
#ifndef Pneumatics_H
|
|
#define Pneumatics_H
|
|
|
|
#include "Commands/Subsystem.h"
|
|
#include "WPILib.h"
|
|
|
|
/**
|
|
* The Pneumatics subsystem contains the compressor and a pressure sensor.
|
|
*
|
|
* NOTE: The simulator currently doesn't support the compressor or pressure sensors.
|
|
*/
|
|
class Pneumatics: public Subsystem
|
|
{
|
|
private:
|
|
AnalogInput* pressureSensor;
|
|
#ifdef REAL
|
|
Compressor* compressor;
|
|
#endif
|
|
|
|
static const double MAX_PRESSURE = 2.55;
|
|
|
|
public:
|
|
Pneumatics();
|
|
|
|
/**
|
|
* No default command
|
|
*/
|
|
void InitDefaultCommand();
|
|
|
|
/**
|
|
* Start the compressor going. The compressor automatically starts and stops as it goes above and below maximum pressure.
|
|
*/
|
|
void Start();
|
|
|
|
/**
|
|
* @return Whether or not the system is fully pressurized.
|
|
*/
|
|
bool IsPressurized();
|
|
|
|
/**
|
|
* Puts the pressure on the SmartDashboard.
|
|
*/
|
|
void WritePressure();
|
|
};
|
|
|
|
#endif
|