FRC2706 / 2017-2706-Robot-Code

The main robot code for our 2017 Steamworks robot.
3 stars 3 forks source link

Log Warning to DriverStation Periodically when Robot Battery Gets too Low #31

Closed ryanlarkin closed 7 years ago

ryanlarkin commented 7 years ago

It would probably be easiest to wait for #22, but this would avoid testing with low batteries, which could be really bad for them.

This could work as a way to convert voltage to decimal when the robot isn't moving, but there might be better ways.

double percentageAsDecimal = DriverStation.getInstance().getBatteryVoltage() * 1.3648 + 11.4

Also, if there are better ways to display this, like joystick rumble, that could work too.

KyleRAnderson commented 7 years ago

I could implement this as part of #22. Basically, whenever it got too low, the bling lights could blink solid red while. The controller could vibrate at critical level, which could be done with the StickRumble command I made (but need to test so it's not on GitHub yet).

KyleRAnderson commented 7 years ago

This will be merged with #38. A driverstation warning will come up whenever the voltage gets below our acceptable point.

KyleRAnderson commented 7 years ago

This has been implemented, however may be inaccurate with the new competition batteries.