mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Added Omar's changes to the compressor interface
Change-Id: Iff22b0eaa319065b06795b381c4d6072f8087da8
This commit is contained in:
@@ -35,32 +35,19 @@ Compressor::~Compressor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the compressor and disables automatic closed-loop control
|
||||
* Starts closed-loop control
|
||||
*/
|
||||
void Compressor::Start() {
|
||||
SetClosedLoopControl(false);
|
||||
SetCompressor(true);
|
||||
SetClosedLoopControl(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the compressor and disables automatic closed-loop control
|
||||
* Stops closed-loop control
|
||||
*/
|
||||
void Compressor::Stop() {
|
||||
SetClosedLoopControl(false);
|
||||
SetCompressor(false);
|
||||
}
|
||||
|
||||
void Compressor::SetCompressor(bool on) {
|
||||
int32_t status = 0;
|
||||
|
||||
setCompressor(m_pcm_pointer, on, &status);
|
||||
|
||||
if(status) {
|
||||
wpi_setWPIError(Timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return true if the compressor is on
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user