147 const char* allocationLocation,
229 double minAnalogVoltage,
230 double maxAnalogVoltage,
261 double minAnalogVoltage,
262 double maxAnalogVoltage,
void HAL_GetREVPHFaults(HAL_REVPHHandle handle, HAL_REVPHFaults *faults, int32_t *status)
Returns the faults currently active on the PH.
HAL_REVPHCompressorConfigType
The compressor configuration type.
Definition REVPH.h:20
int32_t HAL_GetREVPHSolenoidDisabledList(HAL_REVPHHandle handle, int32_t *status)
Get a bitmask of disabled solenoids.
HAL_REVPHCompressorConfigType HAL_GetREVPHCompressorConfig(HAL_REVPHHandle handle, int32_t *status)
Get compressor configuration from the PH.
double HAL_GetREVPHSolenoidVoltage(HAL_REVPHHandle handle, int32_t *status)
Returns the current voltage of the solenoid power supply.
double HAL_GetREVPHSolenoidCurrent(HAL_REVPHHandle handle, int32_t *status)
Returns the total current drawn by all solenoids.
void HAL_GetREVPHStickyFaults(HAL_REVPHHandle handle, HAL_REVPHStickyFaults *stickyFaults, int32_t *status)
Returns the sticky faults currently active on this device.
double HAL_GetREVPH5VVoltage(HAL_REVPHHandle handle, int32_t *status)
Returns the current voltage of the regulated 5v supply.
void HAL_FreeREVPH(HAL_REVPHHandle handle)
Frees a PH handle.
void HAL_SetREVPHClosedLoopControlDisabled(HAL_REVPHHandle handle, int32_t *status)
Disable Compressor.
HAL_REVPHHandle HAL_InitializeREVPH(int32_t module, const char *allocationLocation, int32_t *status)
Initializes a PH.
void HAL_GetREVPHVersion(HAL_REVPHHandle handle, HAL_REVPHVersion *version, int32_t *status)
Returns the hardware and firmware versions of the PH.
int32_t HAL_GetREVPHSolenoids(HAL_REVPHHandle handle, int32_t *status)
Gets a bitmask of solenoid values.
void HAL_ClearREVPHStickyFaults(HAL_REVPHHandle handle, int32_t *status)
Clears the sticky faults.
void HAL_SetREVPHClosedLoopControlDigital(HAL_REVPHHandle handle, int32_t *status)
Enables the compressor in digital mode using the digital pressure switch.
void HAL_SetREVPHClosedLoopControlAnalog(HAL_REVPHHandle handle, double minAnalogVoltage, double maxAnalogVoltage, int32_t *status)
Enables the compressor in analog mode.
double HAL_GetREVPHVoltage(HAL_REVPHHandle handle, int32_t *status)
Returns the current input voltage for the PH.
HAL_Bool HAL_GetREVPHPressureSwitch(HAL_REVPHHandle handle, int32_t *status)
Returns the state of the digital pressure switch.
void HAL_SetREVPHClosedLoopControlHybrid(HAL_REVPHHandle handle, double minAnalogVoltage, double maxAnalogVoltage, int32_t *status)
Enables the compressor in hybrid mode.
double HAL_GetREVPHCompressorCurrent(HAL_REVPHHandle handle, int32_t *status)
Returns the current drawn by the compressor.
double HAL_GetREVPHAnalogVoltage(HAL_REVPHHandle handle, int32_t channel, int32_t *status)
Returns the raw voltage of the specified analog input channel.
HAL_Bool HAL_CheckREVPHSolenoidChannel(int32_t channel)
Checks if a solenoid channel number is valid.
HAL_Bool HAL_CheckREVPHModuleNumber(int32_t module)
Checks if a PH module (CAN ID) is valid.
void HAL_FireREVPHOneShot(HAL_REVPHHandle handle, int32_t index, int32_t durMs, int32_t *status)
Fire a single solenoid shot for the specified duration.
void HAL_SetREVPHSolenoids(HAL_REVPHHandle handle, int32_t mask, int32_t values, int32_t *status)
Sets solenoids on a PH.
HAL_Bool HAL_GetREVPHCompressor(HAL_REVPHHandle handle, int32_t *status)
Get whether compressor is turned on.
void HAL_SetREVPHCompressorConfig(HAL_REVPHHandle handle, const HAL_REVPHCompressorConfig *config, int32_t *status)
Send compressor configuration to the PH.
@ HAL_REVPHCompressorConfigType_kDisabled
Disabled.
Definition REVPH.h:22
@ HAL_REVPHCompressorConfigType_kAnalog
Analog.
Definition REVPH.h:26
@ HAL_REVPHCompressorConfigType_kHybrid
Hybrid.
Definition REVPH.h:28
@ HAL_REVPHCompressorConfigType_kDigital
Digital.
Definition REVPH.h:24
int32_t HAL_Bool
Definition Types.h:73
HAL_Handle HAL_REVPHHandle
Definition Types.h:71
#define HAL_ENUM(name)
Definition Types.h:76
Storage for compressor config.
Definition REVPH.h:52
double maxAnalogVoltage
Definition REVPH.h:54
double minAnalogVoltage
Definition REVPH.h:53
HAL_Bool useDigital
Definition REVPH.h:56
HAL_Bool forceDisable
Definition REVPH.h:55
Storage for REV PH Faults.
Definition REVPH.h:62
uint32_t brownout
The input voltage is below the minimum voltage.
Definition REVPH.h:102
uint32_t channel1Fault
Fault on channel 1.
Definition REVPH.h:66
uint32_t channel4Fault
Fault on channel 4.
Definition REVPH.h:72
uint32_t solenoidOverCurrent
An overcurrent event occurred on a solenoid output.
Definition REVPH.h:100
uint32_t compressorOverCurrent
An overcurrent event occurred on the compressor output.
Definition REVPH.h:96
uint32_t channel0Fault
Fault on channel 0.
Definition REVPH.h:64
uint32_t channel14Fault
Fault on channel 14.
Definition REVPH.h:92
uint32_t compressorOpen
The compressor output has an open circuit.
Definition REVPH.h:98
uint32_t canWarning
A warning was raised by the device's CAN controller.
Definition REVPH.h:104
uint32_t channel5Fault
Fault on channel 5.
Definition REVPH.h:74
uint32_t channel3Fault
Fault on channel 3.
Definition REVPH.h:70
uint32_t hardwareFault
The hardware on the device has malfunctioned.
Definition REVPH.h:106
uint32_t channel13Fault
Fault on channel 13.
Definition REVPH.h:90
uint32_t channel10Fault
Fault on channel 10.
Definition REVPH.h:84
uint32_t channel15Fault
Fault on channel 15.
Definition REVPH.h:94
uint32_t channel9Fault
Fault on channel 9.
Definition REVPH.h:82
uint32_t channel2Fault
Fault on channel 2.
Definition REVPH.h:68
uint32_t channel12Fault
Fault on channel 12.
Definition REVPH.h:88
uint32_t channel8Fault
Fault on channel 8.
Definition REVPH.h:80
uint32_t channel11Fault
Fault on channel 11.
Definition REVPH.h:86
uint32_t channel7Fault
Fault on channel 7.
Definition REVPH.h:78
uint32_t channel6Fault
Fault on channel 6.
Definition REVPH.h:76
Storage for REV PH Sticky Faults.
Definition REVPH.h:112
uint32_t brownout
The input voltage is below the minimum voltage.
Definition REVPH.h:120
uint32_t solenoidOverCurrent
An overcurrent event occurred on a solenoid output.
Definition REVPH.h:118
uint32_t hardwareFault
The hardware on the device has malfunctioned.
Definition REVPH.h:126
uint32_t compressorOverCurrent
An overcurrent event occurred on the compressor output.
Definition REVPH.h:114
uint32_t hasReset
The device has rebooted.
Definition REVPH.h:130
uint32_t compressorOpen
The compressor output has an open circuit.
Definition REVPH.h:116
uint32_t canWarning
A warning was raised by the device's CAN controller.
Definition REVPH.h:122
uint32_t firmwareFault
The firmware on the device has malfunctioned.
Definition REVPH.h:128
uint32_t canBusOff
The device's CAN controller experienced a "Bus Off" event.
Definition REVPH.h:124
Storage for REV PH Version.
Definition REVPH.h:34
uint32_t uniqueId
The device's unique ID.
Definition REVPH.h:46
uint32_t hardwareMinor
The hardware minor version.
Definition REVPH.h:42
uint32_t firmwareMinor
The firmware minor version.
Definition REVPH.h:38
uint32_t firmwareFix
The firmware fix version.
Definition REVPH.h:40
uint32_t hardwareMajor
The hardware major version.
Definition REVPH.h:44
uint32_t firmwareMajor
The firmware major version.
Definition REVPH.h:36