mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Update to 2018_v4 image and new build system. (#598)
* Revert "Force OpenCV to 3.1.0 (#602)"
This reverts commit 50ed55e8e2.
* Removes Simulation
* Removes old build system
* Removes old gtest
* Adds new gmock and gtest
* Updates to new ni-libraries
* removes MyRobot (to be replaced)
* moves files to new location
* Adds new sim backend and new test executables
* updates .styleguide and .gitignore
* Changes cpp WPILibVersion to a function
MSVC throws an AV with the old version.
* Disables USBCamera on all systems except for linux
* 2018 NI Libraries
* New build system
This commit is contained in:
committed by
Peter Johnson
parent
50ed55e8e2
commit
e1195e8b9d
62
hal/src/main/native/include/ctre/PDP.h
Normal file
62
hal/src/main/native/include/ctre/PDP.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef PDP_H_
|
||||
#define PDP_H_
|
||||
#include "ctre.h" //BIT Defines + Typedefs
|
||||
#include "CtreCanNode.h"
|
||||
class PDP : public CtreCanNode
|
||||
{
|
||||
public:
|
||||
/* Get PDP Channel Current
|
||||
*
|
||||
* @Param - deviceNumber - Device ID for PDP. Factory default is 60. Function defaults to 60.
|
||||
*/
|
||||
PDP(UINT8 deviceNumber=0);
|
||||
~PDP();
|
||||
/* Get PDP Channel Current
|
||||
*
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
*
|
||||
* @Param - idx - ID of channel to return current for (channels 1-16)
|
||||
*
|
||||
* @Param - status - Current of channel 'idx' in Amps (A)
|
||||
*/
|
||||
CTR_Code GetChannelCurrent(UINT8 idx, double &status);
|
||||
|
||||
/* Get Bus Voltage of PDP
|
||||
*
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
*
|
||||
* @Param - status - Voltage (V) across PDP
|
||||
*/
|
||||
CTR_Code GetVoltage(double &status);
|
||||
|
||||
/* Get Temperature of PDP
|
||||
*
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
*
|
||||
* @Param - status - Temperature of PDP in Centigrade / Celcius (C)
|
||||
*/
|
||||
CTR_Code GetTemperature(double &status);
|
||||
|
||||
CTR_Code GetTotalCurrent(double ¤tAmps);
|
||||
CTR_Code GetTotalPower(double &powerWatts);
|
||||
CTR_Code GetTotalEnergy(double &energyJoules);
|
||||
/* Clear sticky faults.
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
*/
|
||||
CTR_Code ClearStickyFaults();
|
||||
|
||||
/* Reset Energy Signals
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
*/
|
||||
CTR_Code ResetEnergy();
|
||||
private:
|
||||
uint64_t ReadCurrents(uint8_t api);
|
||||
};
|
||||
extern "C" {
|
||||
void * c_PDP_Init();
|
||||
CTR_Code c_GetChannelCurrent(void * handle,UINT8 idx, double *status);
|
||||
CTR_Code c_GetVoltage(void * handle,double *status);
|
||||
CTR_Code c_GetTemperature(void * handle,double *status);
|
||||
void c_SetDeviceNumber_PDP(void * handle,UINT8 deviceNumber);
|
||||
}
|
||||
#endif /* PDP_H_ */
|
||||
Reference in New Issue
Block a user