[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:
Thad House
2021-08-04 20:31:17 -07:00
committed by GitHub
parent 2014115bca
commit 1ac73a247e
50 changed files with 1612 additions and 1177 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);