Files
allwpilib/hal/lib/Athena/PDP.cpp
Omar Zrien 4da9ebe1fd Artifact artf3520 : Need a PDP Clear Sticky Faults API
Artifact artf3740 : C++ and Java don't implement all PDP features

Change-Id: I6a519d16de412a4d477b1f9c57e9b405b2e1aae0
2014-12-03 14:36:43 -05:00

62 lines
1001 B
C++

#include "HAL/PDP.hpp"
#include "ctre/PDP.h"
static PDP pdp;
double getPDPTemperature(int32_t *status) {
double temperature;
*status = pdp.GetTemperature(temperature);
return temperature;
}
double getPDPVoltage(int32_t *status) {
double voltage;
*status = pdp.GetVoltage(voltage);
return voltage;
}
double getPDPChannelCurrent(uint8_t channel, int32_t *status) {
double current;
*status = pdp.GetChannelCurrent(channel, current);
return current;
}
double getPDPTotalCurrent(int32_t *status) {
double current;
*status = pdp.GetTotalCurrent(current);
return current;
}
double getPDPTotalPower(int32_t *status) {
double power;
*status = pdp.GetTotalPower(power);
return power;
}
double getPDPTotalEnergy(int32_t *status) {
double energy;
*status = pdp.GetTotalEnergy(energy);
return energy;
}
void resetPDPTotalEnergy(int32_t *status) {
*status = pdp.ResetEnergy();
}
void clearPDPStickyFaults(int32_t *status) {
*status = pdp.ClearStickyFaults();
}