mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilibc] Add RobotController::GetBatteryVoltage() to C++ (#3179)
This function already exists in Java.
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <units/voltage.h>
|
||||
|
||||
namespace frc {
|
||||
|
||||
struct CANStatus {
|
||||
@@ -55,6 +57,13 @@ class RobotController {
|
||||
*/
|
||||
static bool GetUserButton();
|
||||
|
||||
/**
|
||||
* Read the battery voltage.
|
||||
*
|
||||
* @return The battery voltage in Volts.
|
||||
*/
|
||||
static units::volt_t GetBatteryVoltage();
|
||||
|
||||
/**
|
||||
* Check if the FPGA outputs are enabled.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user