mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Support for the CAN power distribution panel
Change-Id: If4f8f7f050bf1095221cf16f030a6a8a67532656
This commit is contained in:
28
hal/lib/Athena/PDP.cpp
Normal file
28
hal/lib/Athena/PDP.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user