2014-11-10 13:15:33 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2018-01-02 09:20:21 -08:00
|
|
|
/* Copyright (c) 2011-2018 FIRST. All Rights Reserved. */
|
2014-11-10 13:15:33 -05:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2014-11-10 13:15:33 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
2016-05-25 22:40:15 -07:00
|
|
|
#pragma once
|
2014-11-10 13:15:33 -05:00
|
|
|
|
2018-04-29 23:33:19 -07:00
|
|
|
#include <wpi/deprecated.h>
|
2017-12-10 21:52:49 -08:00
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
class ControllerPower {
|
|
|
|
|
public:
|
2018-05-31 20:47:15 -07:00
|
|
|
/**
|
|
|
|
|
* Get the input voltage to the robot controller.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller input voltage value in Volts
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetInputVoltage();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the input current to the robot controller.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller input current value in Amps
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetInputCurrent();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the voltage of the 3.3V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 3.3V rail voltage value in Volts
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetVoltage3V3();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the current output of the 3.3V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 3.3V rail output current value in Amps
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetCurrent3V3();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the enabled state of the 3.3V rail. The rail may be disabled due to a
|
|
|
|
|
* controller brownout, a short circuit on the rail, or controller
|
|
|
|
|
* over-voltage.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 3.3V rail enabled value. True for enabled.
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static bool GetEnabled3V3();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the count of the total current faults on the 3.3V rail since the
|
|
|
|
|
* controller has booted.
|
|
|
|
|
*
|
|
|
|
|
* @return The number of faults
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static int GetFaultCount3V3();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the voltage of the 5V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 5V rail voltage value in Volts
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetVoltage5V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the current output of the 5V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 5V rail output current value in Amps
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetCurrent5V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the enabled state of the 5V rail. The rail may be disabled due to a
|
|
|
|
|
* controller brownout, a short circuit on the rail, or controller
|
|
|
|
|
* over-voltage.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 5V rail enabled value. True for enabled.
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static bool GetEnabled5V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the count of the total current faults on the 5V rail since the
|
|
|
|
|
* controller has booted.
|
|
|
|
|
*
|
|
|
|
|
* @return The number of faults
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static int GetFaultCount5V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the voltage of the 6V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 6V rail voltage value in Volts
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetVoltage6V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the current output of the 6V rail.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 6V rail output current value in Amps
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2016-11-20 07:25:03 -08:00
|
|
|
static double GetCurrent6V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the enabled state of the 6V rail. The rail may be disabled due to a
|
|
|
|
|
* controller brownout, a short circuit on the rail, or controller
|
|
|
|
|
* over-voltage.
|
|
|
|
|
*
|
|
|
|
|
* @return The controller 6V rail enabled value. True for enabled.
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static bool GetEnabled6V();
|
2018-05-31 20:47:15 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the count of the total current faults on the 6V rail since the
|
|
|
|
|
* controller has booted.
|
|
|
|
|
*
|
|
|
|
|
* @return The number of faults.
|
|
|
|
|
* @deprecated Use RobotController static class method
|
|
|
|
|
*/
|
2017-12-10 21:52:49 -08:00
|
|
|
WPI_DEPRECATED("Use RobotController static class method")
|
2015-06-25 15:07:55 -04:00
|
|
|
static int GetFaultCount6V();
|
2014-11-10 13:15:33 -05:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|