[hal, wpilib] Add brownout voltage configuration (#3632)

This commit is contained in:
Thad House
2021-10-13 19:14:27 -07:00
committed by GitHub
parent 9cd4bc407a
commit 689e9ccfb5
21 changed files with 319 additions and 0 deletions

View File

@@ -394,6 +394,30 @@ class RoboRioSim {
*/
static void SetUserFaults3V3(int userFaults3V3);
/**
* Register a callback to be run whenever the brownout voltage changes.
*
* @param callback the callback
* @param initialNotify whether to call the callback with the initial state
* @return the CallbackStore object associated with this callback
*/
[[nodiscard]] static std::unique_ptr<CallbackStore>
RegisterBrownoutVoltageCallback(NotifyCallback callback, bool initialNotify);
/**
* Measure the brownout voltage.
*
* @return the brownout voltage
*/
static units::volt_t GetBrownoutVoltage();
/**
* Define the brownout voltage.
*
* @param vInVoltage the new voltage
*/
static void SetBrownoutVoltage(units::volt_t brownoutVoltage);
/**
* Reset all simulation data.
*/