mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Update docs for C++ (fixes artf3761 and artf3953)
Change-Id: Ic0c4ac8494cadff13461d9bb8b5943cd87619f0a
This commit is contained in:
@@ -15,7 +15,7 @@ void Compressor::InitCompressor(uint8_t pcmID) {
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* Uses the default solenoid module number
|
||||
* Uses the default PCM ID (0)
|
||||
*/
|
||||
Compressor::Compressor() {
|
||||
InitCompressor(GetDefaultSolenoidModule());
|
||||
@@ -24,7 +24,7 @@ Compressor::Compressor() {
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param module The module number to use (1 or 2)
|
||||
* @param module The PCM ID to use (0-62)
|
||||
*/
|
||||
Compressor::Compressor(uint8_t pcmID) {
|
||||
InitCompressor(pcmID);
|
||||
@@ -35,20 +35,21 @@ Compressor::~Compressor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts closed-loop control
|
||||
* Starts closed-loop control. Note that closed loop control is enabled by default.
|
||||
*/
|
||||
void Compressor::Start() {
|
||||
SetClosedLoopControl(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops closed-loop control
|
||||
* Stops closed-loop control. Note that closed loop control is enabled by default.
|
||||
*/
|
||||
void Compressor::Stop() {
|
||||
SetClosedLoopControl(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if compressor output is active
|
||||
* @return true if the compressor is on
|
||||
*/
|
||||
bool Compressor::Enabled() {
|
||||
@@ -65,6 +66,7 @@ bool Compressor::Enabled() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the pressure switch is triggered
|
||||
* @return true if pressure is low
|
||||
*/
|
||||
bool Compressor::GetPressureSwitchValue() {
|
||||
@@ -82,6 +84,7 @@ bool Compressor::GetPressureSwitchValue() {
|
||||
|
||||
|
||||
/**
|
||||
* Query how much current the compressor is drawing
|
||||
* @return The current through the compressor, in amps
|
||||
*/
|
||||
float Compressor::GetCompressorCurrent() {
|
||||
@@ -101,6 +104,7 @@ float Compressor::GetCompressorCurrent() {
|
||||
/**
|
||||
* Enables or disables automatically turning the compressor on when the
|
||||
* pressure is low.
|
||||
* @param on Set to true to enable closed loop control of the compressor. False to disable.
|
||||
*/
|
||||
void Compressor::SetClosedLoopControl(bool on) {
|
||||
int32_t status = 0;
|
||||
@@ -115,6 +119,7 @@ void Compressor::SetClosedLoopControl(bool on) {
|
||||
/**
|
||||
* Returns true if the compressor will automatically turn on when the
|
||||
* pressure is low.
|
||||
* @return True if closed loop control of the compressor is enabled. False if disabled.
|
||||
*/
|
||||
bool Compressor::GetClosedLoopControl() {
|
||||
int32_t status = 0;
|
||||
@@ -130,6 +135,7 @@ bool Compressor::GetClosedLoopControl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Query if the compressor output has been disabled due to high current draw.
|
||||
* @return true if PCM is in fault state : Compressor Drive is
|
||||
* disabled due to compressor current being too high.
|
||||
*/
|
||||
@@ -146,6 +152,8 @@ bool Compressor::GetCompressorCurrentTooHighFault() {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Query if the compressor output has been disabled due to high current draw (sticky).
|
||||
* A sticky fault will not clear on device reboot, it must be cleared through code or the webdash.
|
||||
* @return true if PCM sticky fault is set : Compressor Drive is
|
||||
* disabled due to compressor current being too high.
|
||||
*/
|
||||
@@ -162,6 +170,8 @@ bool Compressor::GetCompressorCurrentTooHighStickyFault() {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Query if the compressor output has been disabled due to a short circuit (sticky).
|
||||
* A sticky fault will not clear on device reboot, it must be cleared through code or the webdash.
|
||||
* @return true if PCM sticky fault is set : Compressor output
|
||||
* appears to be shorted.
|
||||
*/
|
||||
@@ -178,6 +188,7 @@ bool Compressor::GetCompressorShortedStickyFault() {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Query if the compressor output has been disabled due to a short circuit.
|
||||
* @return true if PCM is in fault state : Compressor output
|
||||
* appears to be shorted.
|
||||
*/
|
||||
@@ -194,6 +205,8 @@ bool Compressor::GetCompressorShortedFault() {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Query if the compressor output does not appear to be wired (sticky).
|
||||
* A sticky fault will not clear on device reboot, it must be cleared through code or the webdash.
|
||||
* @return true if PCM sticky fault is set : Compressor does not
|
||||
* appear to be wired, i.e. compressor is
|
||||
* not drawing enough current.
|
||||
@@ -211,6 +224,7 @@ bool Compressor::GetCompressorNotConnectedStickyFault() {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Query if the compressor output does not appear to be wired.
|
||||
* @return true if PCM is in fault state : Compressor does not
|
||||
* appear to be wired, i.e. compressor is
|
||||
* not drawing enough current.
|
||||
|
||||
Reference in New Issue
Block a user