mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Finishes Prefix Renames (#152)
This commit is contained in:
committed by
Peter Johnson
parent
b637b9ee4c
commit
43a2eccdc9
@@ -22,6 +22,7 @@ import edu.wpi.first.wpilibj.tables.ITable;
|
||||
*/
|
||||
public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
private int m_compressorHandle;
|
||||
private byte m_module;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -33,6 +34,7 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
*/
|
||||
public Compressor(int module) {
|
||||
m_table = null;
|
||||
m_module = (byte)module;
|
||||
|
||||
m_compressorHandle = CompressorJNI.initializeCompressor((byte) module);
|
||||
}
|
||||
@@ -79,7 +81,7 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
* @return true if the pressure is low by reading the pressure switch that is plugged into the PCM
|
||||
*/
|
||||
public boolean getPressureSwitchValue() {
|
||||
return CompressorJNI.getPressureSwitch(m_compressorHandle);
|
||||
return CompressorJNI.getCompressorPressureSwitch(m_compressorHandle);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +100,7 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
* operation of the compressor is disabled.
|
||||
*/
|
||||
public void setClosedLoopControl(boolean on) {
|
||||
CompressorJNI.setClosedLoopControl(m_compressorHandle, on);
|
||||
CompressorJNI.setCompressorClosedLoopControl(m_compressorHandle, on);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,7 +109,7 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
* @return true if compressor is operating on closed-loop mode, otherwise return false.
|
||||
*/
|
||||
public boolean getClosedLoopControl() {
|
||||
return CompressorJNI.getClosedLoopControl(m_compressorHandle);
|
||||
return CompressorJNI.getCompressorClosedLoopControl(m_compressorHandle);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,7 +176,7 @@ public class Compressor extends SensorBase implements LiveWindowSendable {
|
||||
* <p>If no sticky faults are set then this call will have no effect.
|
||||
*/
|
||||
public void clearAllPCMStickyFaults() {
|
||||
CompressorJNI.clearAllPCMStickyFaults(m_compressorHandle);
|
||||
CompressorJNI.clearAllPCMStickyFaults(m_module);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -205,7 +205,7 @@ public abstract class InterruptableSensorBase extends SensorBase {
|
||||
if (m_interrupt == 0) {
|
||||
throw new IllegalStateException("The interrupt is not allocated.");
|
||||
}
|
||||
return InterruptJNI.readRisingTimestamp(m_interrupt);
|
||||
return InterruptJNI.readInterruptRisingTimestamp(m_interrupt);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,7 +219,7 @@ public abstract class InterruptableSensorBase extends SensorBase {
|
||||
if (m_interrupt == 0) {
|
||||
throw new IllegalStateException("The interrupt is not allocated.");
|
||||
}
|
||||
return InterruptJNI.readFallingTimestamp(m_interrupt);
|
||||
return InterruptJNI.readInterruptFallingTimestamp(m_interrupt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,11 +14,11 @@ public class CompressorJNI extends JNIWrapper {
|
||||
|
||||
public static native boolean getCompressor(int compressorHandle);
|
||||
|
||||
public static native void setClosedLoopControl(int compressorHandle, boolean value);
|
||||
public static native void setCompressorClosedLoopControl(int compressorHandle, boolean value);
|
||||
|
||||
public static native boolean getClosedLoopControl(int compressorHandle);
|
||||
public static native boolean getCompressorClosedLoopControl(int compressorHandle);
|
||||
|
||||
public static native boolean getPressureSwitch(int compressorHandle);
|
||||
public static native boolean getCompressorPressureSwitch(int compressorHandle);
|
||||
|
||||
public static native float getCompressorCurrent(int compressorHandle);
|
||||
|
||||
@@ -34,5 +34,5 @@ public class CompressorJNI extends JNIWrapper {
|
||||
|
||||
public static native boolean getCompressorNotConnectedFault(int compressorHandle);
|
||||
|
||||
public static native void clearAllPCMStickyFaults(int compressorHandle);
|
||||
public static native void clearAllPCMStickyFaults(byte compressorModule);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ public class InterruptJNI extends JNIWrapper {
|
||||
|
||||
public static native void disableInterrupts(int interruptHandle);
|
||||
|
||||
public static native double readRisingTimestamp(int interruptHandle);
|
||||
public static native double readInterruptRisingTimestamp(int interruptHandle);
|
||||
|
||||
public static native double readFallingTimestamp(int interruptHandle);
|
||||
public static native double readInterruptFallingTimestamp(int interruptHandle);
|
||||
|
||||
public static native void requestInterrupts(int interruptHandle, int digitalSourceHandle,
|
||||
int analogTriggerType);
|
||||
|
||||
Reference in New Issue
Block a user