WPILibC++  2019.1.1-beta-4-6-g6593f43
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Compressor.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <stdint.h>
11 
12 #include "hal/Types.h"
13 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
30 HAL_CompressorHandle HAL_InitializeCompressor(int32_t module, int32_t* status);
31 
38 HAL_Bool HAL_CheckCompressorModule(int32_t module);
39 
46 HAL_Bool HAL_GetCompressor(HAL_CompressorHandle compressorHandle,
47  int32_t* status);
48 
55 void HAL_SetCompressorClosedLoopControl(HAL_CompressorHandle compressorHandle,
56  HAL_Bool value, int32_t* status);
57 
66  HAL_CompressorHandle compressorHandle, int32_t* status);
67 
75 HAL_Bool HAL_GetCompressorPressureSwitch(HAL_CompressorHandle compressorHandle,
76  int32_t* status);
77 
84 double HAL_GetCompressorCurrent(HAL_CompressorHandle compressorHandle,
85  int32_t* status);
86 
94  HAL_CompressorHandle compressorHandle, int32_t* status);
95 
103  HAL_CompressorHandle compressorHandle, int32_t* status);
104 
112  HAL_CompressorHandle compressorHandle, int32_t* status);
113 
120 HAL_Bool HAL_GetCompressorShortedFault(HAL_CompressorHandle compressorHandle,
121  int32_t* status);
122 
130  HAL_CompressorHandle compressorHandle, int32_t* status);
131 
139  HAL_CompressorHandle compressorHandle, int32_t* status);
140 #ifdef __cplusplus
141 } // extern "C"
142 #endif
143 
HAL_Bool HAL_GetCompressorShortedFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if the compressor is faulted because of a short.
HAL_Bool HAL_GetCompressorPressureSwitch(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets the compressor pressure switch state.
HAL_Bool HAL_GetCompressor(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets the compressor state (on or off).
HAL_Bool HAL_CheckCompressorModule(int32_t module)
Gets if a compressor module is valid.
HAL_Bool HAL_GetCompressorNotConnectedFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if the compressor is not connected.
void HAL_SetCompressorClosedLoopControl(HAL_CompressorHandle compressorHandle, HAL_Bool value, int32_t *status)
Sets the compressor to closed loop mode.
HAL_Bool HAL_GetCompressorShortedStickyFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if a sticky fauly is triggered because of a short.
HAL_Bool HAL_GetCompressorNotConnectedStickyFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if a sticky fault is triggered of the compressor not connected.
HAL_Bool HAL_GetCompressorCurrentTooHighStickyFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if a sticky fauly is triggered because of too high of current.
HAL_CompressorHandle HAL_InitializeCompressor(int32_t module, int32_t *status)
Initializes a compressor on the given PCM module.
HAL_Bool HAL_GetCompressorClosedLoopControl(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if the compressor is in closed loop mode.
HAL_Bool HAL_GetCompressorCurrentTooHighFault(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets if the compressor is faulted because of too high of current.
double HAL_GetCompressorCurrent(HAL_CompressorHandle compressorHandle, int32_t *status)
Gets the compressor current.