mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[hal] Rename PowerDistributionPanel to PowerDistribution (#3466)
Makes HAL more generic for the PDP, to enable the Rev PDH in the future.
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PDPJNI extends JNIWrapper {
|
||||
public static native int initializePDP(int module);
|
||||
|
||||
public static native boolean checkPDPModule(int module);
|
||||
|
||||
public static native boolean checkPDPChannel(int channel);
|
||||
|
||||
public static native double getPDPTemperature(int handle);
|
||||
|
||||
public static native double getPDPVoltage(int handle);
|
||||
|
||||
public static native double getPDPChannelCurrent(byte channel, int handle);
|
||||
|
||||
public static native void getPDPAllCurrents(int handle, double[] currents);
|
||||
|
||||
public static native double getPDPTotalCurrent(int handle);
|
||||
|
||||
public static native double getPDPTotalPower(int handle);
|
||||
|
||||
public static native double getPDPTotalEnergy(int handle);
|
||||
|
||||
public static native void resetPDPTotalEnergy(int handle);
|
||||
|
||||
public static native void clearPDPStickyFaults(int handle);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PowerDistributionJNI extends JNIWrapper {
|
||||
public static native int initialize(int module, int type);
|
||||
|
||||
public static native boolean checkModule(int module, int type);
|
||||
|
||||
public static native boolean checkChannel(int handle, int channel);
|
||||
|
||||
public static native int getType(int handle);
|
||||
|
||||
public static native double getTemperature(int handle);
|
||||
|
||||
public static native double getVoltage(int handle);
|
||||
|
||||
public static native double getChannelCurrent(byte channel, int handle);
|
||||
|
||||
public static native void getAllCurrents(int handle, double[] currents);
|
||||
|
||||
public static native double getTotalCurrent(int handle);
|
||||
|
||||
public static native double getTotalPower(int handle);
|
||||
|
||||
public static native double getTotalEnergy(int handle);
|
||||
|
||||
public static native void resetTotalEnergy(int handle);
|
||||
|
||||
public static native void clearStickyFaults(int handle);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ package edu.wpi.first.hal.simulation;
|
||||
|
||||
import edu.wpi.first.hal.JNIWrapper;
|
||||
|
||||
public class PDPDataJNI extends JNIWrapper {
|
||||
public class PowerDistributionDataJNI extends JNIWrapper {
|
||||
public static native int registerInitializedCallback(
|
||||
int index, NotifyCallback callback, boolean initialNotify);
|
||||
|
||||
Reference in New Issue
Block a user