Package frclib.sensor
Class FrcRobotBattery
java.lang.Object
trclib.sensor.TrcRobotBattery
frclib.sensor.FrcRobotBattery
This class extends the TrcRobotBattery which provides a task to monitor the robot battery levels and the methods to
access the highest and the lowest battery levels during the monitoring session.
-
Constructor Summary
ConstructorsConstructorDescriptionFrcRobotBattery(int canId, edu.wpi.first.wpilibj.PowerDistribution.ModuleType moduleType) Constructor: Creates an instance of the object.FrcRobotBattery(FrcPdp pdp) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptiondoubleThis method returns the robot battery current.doublegetPower()This method returns the robot battery power.doubleThis method returns the robot battery voltage.Methods inherited from class trclib.sensor.TrcRobotBattery
getHighestCurrent, getHighestPower, getHighestVoltage, getLowestCurrent, getLowestPower, getLowestVoltage, getTotalEnergy, setEnabled, toString
-
Constructor Details
-
FrcRobotBattery
Constructor: Creates an instance of the object.- Parameters:
pdp- specifies the PDP object.
-
FrcRobotBattery
public FrcRobotBattery(int canId, edu.wpi.first.wpilibj.PowerDistribution.ModuleType moduleType) Constructor: Creates an instance of the object.- Parameters:
canId- specifies the CAN ID of the PDP.
-
-
Method Details
-
getVoltage
public double getVoltage()This method returns the robot battery voltage.- Specified by:
getVoltagein classTrcRobotBattery- Returns:
- robot battery voltage in volts.
-
getCurrent
public double getCurrent()This method returns the robot battery current.- Specified by:
getCurrentin classTrcRobotBattery- Returns:
- robot battery current in amps.
-
getPower
public double getPower()This method returns the robot battery power.- Specified by:
getPowerin classTrcRobotBattery- Returns:
- robot battery current in watts.
-