[hal, wpilib] Remove power rails that don't exist on systemcore (#7861)

This commit is contained in:
Thad House
2025-03-14 10:16:08 -07:00
committed by GitHub
parent d3cc185382
commit 52b353fe57
44 changed files with 27 additions and 3196 deletions

View File

@@ -22,14 +22,6 @@ struct CANStatus {
int transmitErrorCount;
};
/** State for the radio led. */
enum RadioLEDState {
kOff = 0, ///< Off.
kGreen = 1, ///< Green.
kRed = 2, ///< Red.
kOrange = 3 ///< Orange.
};
class RobotController {
public:
RobotController() = delete;
@@ -105,17 +97,6 @@ class RobotController {
*/
static uint64_t GetFPGATime();
/**
* Get the state of the "USER" button on the roboRIO.
*
* @warning the User Button is used to stop user programs from automatically
* loading if it is held for more then 5 seconds. Because of this, it's not
* recommended to be used by teams for any other purpose.
*
* @return True if the button is currently pressed down
*/
static bool GetUserButton();
/**
* Read the battery voltage.
*
@@ -168,13 +149,6 @@ class RobotController {
*/
static double GetInputVoltage();
/**
* Get the input current to the robot controller.
*
* @return The controller input current value in Amps
*/
static double GetInputCurrent();
/**
* Get the voltage of the 3.3V rail.
*
@@ -213,82 +187,6 @@ class RobotController {
*/
static int GetFaultCount3V3();
/**
* Get the voltage of the 5V rail.
*
* @return The controller 5V rail voltage value in Volts
*/
static double GetVoltage5V();
/**
* Get the current output of the 5V rail.
*
* @return The controller 5V rail output current value in Amps
*/
static double GetCurrent5V();
/**
* Enables or disables the 5V rail.
*
* @param enabled whether to enable the 5V rail.
*/
static void SetEnabled5V(bool enabled);
/**
* Get the enabled state of the 5V rail. The rail may be disabled due to
* calling SetEnabled5V(), a controller brownout, a short circuit on the rail,
* or controller over-voltage.
*
* @return The controller 5V rail enabled value. True for enabled.
*/
static bool GetEnabled5V();
/**
* Get the count of the total current faults on the 5V rail since the
* code started.
*
* @return The number of faults
*/
static int GetFaultCount5V();
/**
* Get the voltage of the 6V rail.
*
* @return The controller 6V rail voltage value in Volts
*/
static double GetVoltage6V();
/**
* Get the current output of the 6V rail.
*
* @return The controller 6V rail output current value in Amps
*/
static double GetCurrent6V();
/**
* Enables or disables the 6V rail.
*
* @param enabled whether to enable the 6V rail.
*/
static void SetEnabled6V(bool enabled);
/**
* Get the enabled state of the 6V rail. The rail may be disabled due to
* calling SetEnabled6V(), a controller brownout, a short circuit on the rail,
* or controller over-voltage.
*
* @return The controller 6V rail enabled value. True for enabled.
*/
static bool GetEnabled6V();
/**
* Get the count of the total current faults on the 6V rail since the
* code started.
*
* @return The number of faults.
*/
static int GetFaultCount6V();
/** Reset the overcurrent fault counters for all user rails to 0. */
static void ResetRailFaultCounts();
@@ -316,23 +214,6 @@ class RobotController {
*/
static units::celsius_t GetCPUTemp();
/**
* Set the state of the "Radio" LED. On the RoboRIO, this writes to sysfs, so
* this function should not be called multiple times per loop cycle to avoid
* overruns.
* @param state The state to set the LED to.
*/
static void SetRadioLEDState(RadioLEDState state);
/**
* Get the state of the "Radio" LED. On the RoboRIO, this reads from sysfs, so
* this function should not be called multiple times per loop cycle to avoid
* overruns.
*
* @return The state of the LED.
*/
static RadioLEDState GetRadioLEDState();
/**
* Get the current status of the CAN bus.
*

View File

@@ -21,31 +21,6 @@ namespace frc::sim {
*/
class RoboRioSim {
public:
/**
* Register a callback to be run when the FPGA button state changes.
*
* @param callback the callback
* @param initialNotify whether to run the callback with the initial state
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterFPGAButtonCallback(
NotifyCallback callback, bool initialNotify);
/**
* Query the state of the FPGA button.
*
* @return the FPGA button state
*/
static bool GetFPGAButton();
/**
* Define the state of the FPGA button.
*
* @param fPGAButton the new state
*/
static void SetFPGAButton(bool fPGAButton);
/**
* Register a callback to be run whenever the Vin voltage changes.
*
@@ -71,188 +46,6 @@ class RoboRioSim {
*/
static void SetVInVoltage(units::volt_t vInVoltage);
/**
* Register a callback to be run whenever the Vin current changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterVInCurrentCallback(
NotifyCallback callback, bool initialNotify);
/**
* Measure the Vin current.
*
* @return the Vin current
*/
static units::ampere_t GetVInCurrent();
/**
* Define the Vin current.
*
* @param vInCurrent the new current
*/
static void SetVInCurrent(units::ampere_t vInCurrent);
/**
* Register a callback to be run whenever the 6V rail voltage changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserVoltage6VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Measure the 6V rail voltage.
*
* @return the 6V rail voltage
*/
static units::volt_t GetUserVoltage6V();
/**
* Define the 6V rail voltage.
*
* @param userVoltage6V the new voltage
*/
static void SetUserVoltage6V(units::volt_t userVoltage6V);
/**
* Register a callback to be run whenever the 6V rail current changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserCurrent6VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Measure the 6V rail current.
*
* @return the 6V rail current
*/
static units::ampere_t GetUserCurrent6V();
/**
* Define the 6V rail current.
*
* @param userCurrent6V the new current
*/
static void SetUserCurrent6V(units::ampere_t userCurrent6V);
/**
* Register a callback to be run whenever the 6V rail active state changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial state
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserActive6VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Get the 6V rail active state.
*
* @return true if the 6V rail is active
*/
static bool GetUserActive6V();
/**
* Set the 6V rail active state.
*
* @param userActive6V true to make rail active
*/
static void SetUserActive6V(bool userActive6V);
/**
* Register a callback to be run whenever the 5V rail voltage changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserVoltage5VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Measure the 5V rail voltage.
*
* @return the 5V rail voltage
*/
static units::volt_t GetUserVoltage5V();
/**
* Define the 5V rail voltage.
*
* @param userVoltage5V the new voltage
*/
static void SetUserVoltage5V(units::volt_t userVoltage5V);
/**
* Register a callback to be run whenever the 5V rail current changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserCurrent5VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Measure the 5V rail current.
*
* @return the 5V rail current
*/
static units::ampere_t GetUserCurrent5V();
/**
* Define the 5V rail current.
*
* @param userCurrent5V the new current
*/
static void SetUserCurrent5V(units::ampere_t userCurrent5V);
/**
* Register a callback to be run whenever the 5V rail active state changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial state
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserActive5VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Get the 5V rail active state.
*
* @return true if the 5V rail is active
*/
static bool GetUserActive5V();
/**
* Set the 5V rail active state.
*
* @param userActive5V true to make rail active
*/
static void SetUserActive5V(bool userActive5V);
/**
* Register a callback to be run whenever the 3.3V rail voltage changes.
*
@@ -331,60 +124,6 @@ class RoboRioSim {
*/
static void SetUserActive3V3(bool userActive3V3);
/**
* Register a callback to be run whenever the 6V rail number of faults
* changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserFaults6VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Get the 6V rail number of faults.
*
* @return number of faults
*/
static int GetUserFaults6V();
/**
* Set the 6V rail number of faults.
*
* @param userFaults6V number of faults
*/
static void SetUserFaults6V(int userFaults6V);
/**
* Register a callback to be run whenever the 5V rail number of faults
* changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterUserFaults5VCallback(
NotifyCallback callback, bool initialNotify);
/**
* Get the 5V rail number of faults.
*
* @return number of faults
*/
static int GetUserFaults5V();
/**
* Set the 5V rail number of faults.
*
* @param userFaults5V number of faults
*/
static void SetUserFaults5V(int userFaults5V);
/**
* Register a callback to be run whenever the 3.3V rail number of faults
* changes.
@@ -515,32 +254,6 @@ class RoboRioSim {
*/
static void SetComments(std::string_view comments);
/**
* Register a callback to be run whenever the Radio led state changes.
*
* @param callback the callback
* @param initialNotify whether the callback should be called with the
* initial value
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]]
static std::unique_ptr<CallbackStore> RegisterRadioLEDStateCallback(
NotifyCallback callback, bool initialNotify);
/**
* Get the state of the radio led.
*
* @return The state of the radio led.
*/
static RadioLEDState GetRadioLEDState();
/**
* Set the state of the radio led.
*
* @param state The state of the radio led.
*/
static void SetRadioLEDState(RadioLEDState state);
/**
* Reset all simulation data.
*/