2016-05-25 20:23:37 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
/* Copyright (c) FIRST 2016. All Rights Reserved. */
|
|
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
2014-05-29 14:25:09 -04:00
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
2014-05-29 14:25:09 -04:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
#include "HAL/Handles.h"
|
2014-05-29 14:25:09 -04:00
|
|
|
|
|
|
|
|
extern "C" {
|
2016-07-02 08:22:44 -07:00
|
|
|
HalCompressorHandle initializeCompressor(uint8_t module, int32_t* status);
|
2016-05-20 17:30:37 -07:00
|
|
|
bool checkCompressorModule(uint8_t module);
|
|
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
bool getCompressor(HalCompressorHandle compressor_handle, int32_t* status);
|
2016-05-20 17:30:37 -07:00
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
void setClosedLoopControl(HalCompressorHandle compressor_handle, bool value,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
bool getClosedLoopControl(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
2016-05-20 17:30:37 -07:00
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
bool getPressureSwitch(HalCompressorHandle compressor_handle, int32_t* status);
|
|
|
|
|
float getCompressorCurrent(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
2016-05-20 17:30:37 -07:00
|
|
|
|
2016-07-02 08:22:44 -07:00
|
|
|
bool getCompressorCurrentTooHighFault(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
bool getCompressorCurrentTooHighStickyFault(
|
|
|
|
|
HalCompressorHandle compressor_handle, int32_t* status);
|
|
|
|
|
bool getCompressorShortedStickyFault(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
bool getCompressorShortedFault(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
bool getCompressorNotConnectedStickyFault(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
bool getCompressorNotConnectedFault(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
|
|
|
|
void clearAllPCMStickyFaults(HalCompressorHandle compressor_handle,
|
|
|
|
|
int32_t* status);
|
2014-05-29 14:25:09 -04:00
|
|
|
}
|