Java 类edu.wpi.first.wpilibj.hal.PowerJNI 实例源码

项目:FakeWPILib    文件:DriverStation.java   
/**
 * Read the battery voltage.
 *
 * @return The battery voltage in Volts.
 */
public double getBatteryVoltage() {
    IntBuffer status = ByteBuffer.allocateDirect(4).asIntBuffer();
    float voltage = PowerJNI.getVinVoltage(status);
    return voltage;
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the input voltage to the robot controller.
 *
 * @return The controller input voltage value in Volts
 */
public static double getInputVoltage() {
  return PowerJNI.getVinVoltage();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the input current to the robot controller.
 *
 * @return The controller input current value in Amps
 */
public static double getInputCurrent() {
  return PowerJNI.getVinCurrent();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the voltage of the 3.3V rail.
 *
 * @return The controller 3.3V rail voltage value in Volts
 */
public static double getVoltage3V3() {
  return PowerJNI.getUserVoltage3V3();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the current output of the 3.3V rail.
 *
 * @return The controller 3.3V rail output current value in Volts
 */
public static double getCurrent3V3() {
  return PowerJNI.getUserCurrent3V3();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the enabled state of the 3.3V rail. The rail may be disabled due to a controller brownout,
 * a short circuit on the rail, or controller over-voltage.
 *
 * @return The controller 3.3V rail enabled value
 */
public static boolean getEnabled3V3() {
  return PowerJNI.getUserActive3V3();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 3.3V rail since the controller has booted.
 *
 * @return The number of faults
 */
public static int getFaultCount3V3() {
  return PowerJNI.getUserCurrentFaults3V3();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the voltage of the 5V rail.
 *
 * @return The controller 5V rail voltage value in Volts
 */
public static double getVoltage5V() {
  return PowerJNI.getUserVoltage5V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the current output of the 5V rail.
 *
 * @return The controller 5V rail output current value in Amps
 */
public static double getCurrent5V() {
  return PowerJNI.getUserCurrent5V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the enabled state of the 5V rail. The rail may be disabled due to a controller brownout, a
 * short circuit on the rail, or controller over-voltage.
 *
 * @return The controller 5V rail enabled value
 */
public static boolean getEnabled5V() {
  return PowerJNI.getUserActive5V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 5V rail since the controller has booted.
 *
 * @return The number of faults
 */
public static int getFaultCount5V() {
  return PowerJNI.getUserCurrentFaults5V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the voltage of the 6V rail.
 *
 * @return The controller 6V rail voltage value in Volts
 */
public static double getVoltage6V() {
  return PowerJNI.getUserVoltage6V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the current output of the 6V rail.
 *
 * @return The controller 6V rail output current value in Amps
 */
public static double getCurrent6V() {
  return PowerJNI.getUserCurrent6V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the enabled state of the 6V rail. The rail may be disabled due to a controller brownout, a
 * short circuit on the rail, or controller over-voltage.
 *
 * @return The controller 6V rail enabled value
 */
public static boolean getEnabled6V() {
  return PowerJNI.getUserActive6V();
}
项目:snobot-2017    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 6V rail since the controller has booted.
 *
 * @return The number of faults
 */
public static int getFaultCount6V() {
  return PowerJNI.getUserCurrentFaults6V();
}
项目:snobot-2017    文件:DriverStation.java   
/**
 * Read the battery voltage.
 *
 * @return The battery voltage in Volts.
 */
public double getBatteryVoltage() {
  return PowerJNI.getVinVoltage();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the input voltage to the robot controller
 *$
 * @return The controller input voltage value in Volts
 */
public static double getInputVoltage() {
  return PowerJNI.getVinVoltage();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the input current to the robot controller
 *$
 * @return The controller input current value in Amps
 */
public static double getInputCurrent() {
  return PowerJNI.getVinCurrent();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the voltage of the 3.3V rail
 *$
 * @return The controller 3.3V rail voltage value in Volts
 */
public static double getVoltage3V3() {
  return PowerJNI.getUserVoltage3V3();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the current output of the 3.3V rail
 *$
 * @return The controller 3.3V rail output current value in Volts
 */
public static double getCurrent3V3() {
  return PowerJNI.getUserCurrent3V3();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the enabled state of the 3.3V rail. The rail may be disabled due to a
 * controller brownout, a short circuit on the rail, or controller
 * over-voltage
 *$
 * @return The controller 3.3V rail enabled value
 */
public static boolean getEnabled3V3() {
  return PowerJNI.getUserActive3V3();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 3.3V rail since the
 * controller has booted
 *$
 * @return The number of faults
 */
public static int getFaultCount3V3() {
  return PowerJNI.getUserCurrentFaults3V3();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the voltage of the 5V rail
 *$
 * @return The controller 5V rail voltage value in Volts
 */
public static double getVoltage5V() {
  return PowerJNI.getUserVoltage5V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the current output of the 5V rail
 *$
 * @return The controller 5V rail output current value in Amps
 */
public static double getCurrent5V() {
  return PowerJNI.getUserCurrent5V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the enabled state of the 5V rail. The rail may be disabled due to a
 * controller brownout, a short circuit on the rail, or controller
 * over-voltage
 *$
 * @return The controller 5V rail enabled value
 */
public static boolean getEnabled5V() {
  return PowerJNI.getUserActive5V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 5V rail since the
 * controller has booted
 *$
 * @return The number of faults
 */
public static int getFaultCount5V() {
  return PowerJNI.getUserCurrentFaults5V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the voltage of the 6V rail
 *$
 * @return The controller 6V rail voltage value in Volts
 */
public static double getVoltage6V() {
  return PowerJNI.getUserVoltage6V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the current output of the 6V rail
 *$
 * @return The controller 6V rail output current value in Amps
 */
public static double getCurrent6V() {
  return PowerJNI.getUserCurrent6V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the enabled state of the 6V rail. The rail may be disabled due to a
 * controller brownout, a short circuit on the rail, or controller
 * over-voltage
 *$
 * @return The controller 6V rail enabled value
 */
public static boolean getEnabled6V() {
  return PowerJNI.getUserActive6V();
}
项目:Frc2016FirstStronghold    文件:ControllerPower.java   
/**
 * Get the count of the total current faults on the 6V rail since the
 * controller has booted
 *$
 * @return The number of faults
 */
public static int getFaultCount6V() {
  return PowerJNI.getUserCurrentFaults6V();
}
项目:Frc2016FirstStronghold    文件:DriverStation.java   
/**
 * Read the battery voltage.
 *
 * @return The battery voltage in Volts.
 */
public double getBatteryVoltage() {
  return PowerJNI.getVinVoltage();
}