WPILibC++  2019.2.1-23-g997d4fd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Compressor Functions

Functions

HAL_CompressorHandle HAL_InitializeCompressor (int32_t module, int32_t *status)
 Initializes a compressor on the given PCM module. More...
 
HAL_Bool HAL_CheckCompressorModule (int32_t module)
 Gets if a compressor module is valid. More...
 
HAL_Bool HAL_GetCompressor (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets the compressor state (on or off). More...
 
void HAL_SetCompressorClosedLoopControl (HAL_CompressorHandle compressorHandle, HAL_Bool value, int32_t *status)
 Sets the compressor to closed loop mode. More...
 
HAL_Bool HAL_GetCompressorClosedLoopControl (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if the compressor is in closed loop mode. More...
 
HAL_Bool HAL_GetCompressorPressureSwitch (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets the compressor pressure switch state. More...
 
double HAL_GetCompressorCurrent (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets the compressor current. More...
 
HAL_Bool HAL_GetCompressorCurrentTooHighFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if the compressor is faulted because of too high of current. More...
 
HAL_Bool HAL_GetCompressorCurrentTooHighStickyFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if a sticky fauly is triggered because of too high of current. More...
 
HAL_Bool HAL_GetCompressorShortedStickyFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if a sticky fauly is triggered because of a short. More...
 
HAL_Bool HAL_GetCompressorShortedFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if the compressor is faulted because of a short. More...
 
HAL_Bool HAL_GetCompressorNotConnectedStickyFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if a sticky fault is triggered of the compressor not connected. More...
 
HAL_Bool HAL_GetCompressorNotConnectedFault (HAL_CompressorHandle compressorHandle, int32_t *status)
 Gets if the compressor is not connected. More...
 

Detailed Description

Function Documentation

HAL_Bool HAL_CheckCompressorModule ( int32_t  module)

Gets if a compressor module is valid.

Parameters
modulethe module number
Returns
true if the module is valid, otherwise false
HAL_Bool HAL_GetCompressor ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets the compressor state (on or off).

Parameters
compressorHandlethe compressor handle
Returns
true if the compressor is on, otherwise false
HAL_Bool HAL_GetCompressorClosedLoopControl ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if the compressor is in closed loop mode.

Parameters
compressorHandlethe compressor handle
Returns
true if the compressor is in closed loop mode, otherwise false
double HAL_GetCompressorCurrent ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets the compressor current.

Parameters
compressorHandlethe compressor handle
Returns
the compressor current in amps
HAL_Bool HAL_GetCompressorCurrentTooHighFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if the compressor is faulted because of too high of current.

Parameters
compressorHandlethe compressor handle
Returns
true if falted, otherwise false
HAL_Bool HAL_GetCompressorCurrentTooHighStickyFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if a sticky fauly is triggered because of too high of current.

Parameters
compressorHandlethe compressor handle
Returns
true if falted, otherwise false
HAL_Bool HAL_GetCompressorNotConnectedFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if the compressor is not connected.

Parameters
compressorHandlethe compressor handle
Returns
true if not connected, otherwise false
HAL_Bool HAL_GetCompressorNotConnectedStickyFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if a sticky fault is triggered of the compressor not connected.

Parameters
compressorHandlethe compressor handle
Returns
true if falted, otherwise false
HAL_Bool HAL_GetCompressorPressureSwitch ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets the compressor pressure switch state.

Parameters
compressorHandlethe compressor handle
Returns
true if the pressure switch is triggered, otherwise false
HAL_Bool HAL_GetCompressorShortedFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if the compressor is faulted because of a short.

Parameters
compressorHandlethe compressor handle
Returns
true if shorted, otherwise false
HAL_Bool HAL_GetCompressorShortedStickyFault ( HAL_CompressorHandle  compressorHandle,
int32_t *  status 
)

Gets if a sticky fauly is triggered because of a short.

Parameters
compressorHandlethe compressor handle
Returns
true if falted, otherwise false
HAL_CompressorHandle HAL_InitializeCompressor ( int32_t  module,
int32_t *  status 
)

Initializes a compressor on the given PCM module.

Parameters
modulethe module number
Returns
the created handle
void HAL_SetCompressorClosedLoopControl ( HAL_CompressorHandle  compressorHandle,
HAL_Bool  value,
int32_t *  status 
)

Sets the compressor to closed loop mode.

Parameters
compressorHandlethe compressor handle
valuetrue for closed loop mode, false for off