Added Omar's changes to the compressor interface

Change-Id: Iff22b0eaa319065b06795b381c4d6072f8087da8
This commit is contained in:
thomasclark
2014-06-12 12:43:03 -04:00
parent 5d646536fb
commit 8d5c67e6aa
8 changed files with 270 additions and 405 deletions

View File

@@ -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
*/