Package com.thegongoliers.input.power
Class Battery
- java.lang.Object
-
- com.thegongoliers.input.power.Battery
-
public class Battery extends java.lang.Object
The robot's battery
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBatteryPercentage()
Get the estimated battery percentage
-
-
-
Constructor Detail
-
Battery
public Battery(double minVoltage, double maxVoltage, double capacity)
Constructor- Parameters:
minVoltage
- the minimum voltage of the battery in VoltsmaxVoltage
- the maximum voltage of the battery in Voltscapacity
- the total capacity of the battery in Amp-hours
-
Battery
public Battery(double initialCharge, double capacity)
Constructor- Parameters:
initialCharge
- the current percent charge of the battery between 0 and 1capacity
- the total capacity of the battery in Amp-hours
-
-