Package frclib.sensor

Class FrcRobotBattery

java.lang.Object
trclib.sensor.TrcRobotBattery
frclib.sensor.FrcRobotBattery

public class FrcRobotBattery extends TrcRobotBattery
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 Details

    • FrcRobotBattery

      public FrcRobotBattery(FrcPdp pdp)
      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:
      getVoltage in class TrcRobotBattery
      Returns:
      robot battery voltage in volts.
    • getCurrent

      public double getCurrent()
      This method returns the robot battery current.
      Specified by:
      getCurrent in class TrcRobotBattery
      Returns:
      robot battery current in amps.
    • getPower

      public double getPower()
      This method returns the robot battery power.
      Specified by:
      getPower in class TrcRobotBattery
      Returns:
      robot battery current in watts.