mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Clean up Java warning suppressions (#4433)
Checkstyle naming conventions were changed to allow most of what's in wpimath. Naming rules were disabled completely in wpimath since almost all suppressions are for math notation.
This commit is contained in:
@@ -5,12 +5,11 @@
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
/** Structure for holding the values stored in an accumulator. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public class AccumulatorResult {
|
||||
/** The total value accumulated. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public long value;
|
||||
/** The number of sample value was accumulated over. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public long count;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class AddressableLEDJNI extends JNIWrapper {
|
||||
public static native int initialize(int pwmHandle);
|
||||
|
||||
|
||||
@@ -111,6 +111,5 @@ public class AnalogJNI extends JNIWrapper {
|
||||
|
||||
public static native boolean getAnalogTriggerOutput(int analogTriggerHandle, int type);
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native int getAnalogTriggerFPGAIndex(int analogTriggerHandle);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class CANAPIJNI extends JNIWrapper {
|
||||
public static native int initializeCAN(int manufacturer, int deviceId, int deviceType);
|
||||
|
||||
|
||||
@@ -4,14 +4,10 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public class CANData {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final byte[] data = new byte[8];
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public int length;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public long timestamp;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class CTREPCMJNI extends JNIWrapper {
|
||||
public static native int initialize(int module);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class DIOJNI extends JNIWrapper {
|
||||
public static native int initializeDIOPort(int halPortHandle, boolean input);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class DMAJNI extends JNIWrapper {
|
||||
public static native int initialize();
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ package edu.wpi.first.hal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class DMAJNISample {
|
||||
private static final int kEnable_Accumulator0 = 8;
|
||||
private static final int kEnable_Accumulator1 = 9;
|
||||
|
||||
@@ -17,6 +17,5 @@ public class DutyCycleJNI extends JNIWrapper {
|
||||
|
||||
public static native int getOutputScaleFactor(int handle);
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native int getFPGAIndex(int handle);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public class EncoderJNI extends JNIWrapper {
|
||||
public static native void setEncoderIndexSource(
|
||||
int encoderHandle, int digitalSourceHandle, int analogTriggerType, int indexingType);
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native int getEncoderFPGAIndex(int encoderHandle);
|
||||
|
||||
public static native int getEncoderEncodingScale(int encoderHandle);
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.List;
|
||||
* JNI Wrapper for HAL<br>
|
||||
* .
|
||||
*/
|
||||
@SuppressWarnings({"AbbreviationAsWordInName", "MethodName"})
|
||||
public final class HAL extends JNIWrapper {
|
||||
public static native void waitForDSData();
|
||||
|
||||
@@ -153,7 +152,11 @@ public final class HAL extends JNIWrapper {
|
||||
|
||||
public static native int nativeGetControlWord();
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
/**
|
||||
* Get the current DriverStation control word.
|
||||
*
|
||||
* @param controlWord Storage for control word.
|
||||
*/
|
||||
public static void getControlWord(ControlWord controlWord) {
|
||||
int word = nativeGetControlWord();
|
||||
controlWord.update(
|
||||
@@ -167,7 +170,11 @@ public final class HAL extends JNIWrapper {
|
||||
|
||||
private static native int nativeGetAllianceStation();
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
/**
|
||||
* Get the alliance station.
|
||||
*
|
||||
* @return The alliance station.
|
||||
*/
|
||||
public static AllianceStationID getAllianceStation() {
|
||||
switch (nativeGetAllianceStation()) {
|
||||
case 0:
|
||||
@@ -187,13 +194,10 @@ public final class HAL extends JNIWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
public static native boolean isNewControlData();
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
public static native void releaseDSMutex();
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
public static native boolean waitForDSDataTimeout(double timeout);
|
||||
|
||||
public static final int kMaxJoystickAxes = 12;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public final class HALUtil extends JNIWrapper {
|
||||
public static final int NULL_PARAMETER = -1005;
|
||||
public static final int SAMPLE_RATE_TOO_HIGH = 1001;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public final class HALValue {
|
||||
public static final int kUnassigned = 0;
|
||||
public static final int kBoolean = 0x01;
|
||||
|
||||
@@ -6,7 +6,6 @@ package edu.wpi.first.hal;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class I2CJNI extends JNIWrapper {
|
||||
public static native void i2CInitialize(int port);
|
||||
|
||||
|
||||
@@ -5,25 +5,21 @@
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
/** Structure for holding the match info data request. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public class MatchInfoData {
|
||||
/** Stores the event name. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public String eventName = "";
|
||||
|
||||
/** Stores the game specific message. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public String gameSpecificMessage = "";
|
||||
|
||||
/** Stores the match number. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int matchNumber;
|
||||
|
||||
/** Stores the replay number. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int replayNumber;
|
||||
|
||||
/** Stores the match type. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int matchType;
|
||||
|
||||
/**
|
||||
@@ -35,7 +31,6 @@ public class MatchInfoData {
|
||||
* @param replayNumber Replay number.
|
||||
* @param matchType Match type.
|
||||
*/
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
public void setData(
|
||||
String eventName,
|
||||
String gameSpecificMessage,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
/** Structure for holding the config data result for PWM. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public class PWMConfigDataResult {
|
||||
PWMConfigDataResult(int max, int deadbandMax, int center, int deadbandMin, int min) {
|
||||
this.max = max;
|
||||
@@ -15,22 +16,17 @@ public class PWMConfigDataResult {
|
||||
}
|
||||
|
||||
/** The maximum PWM value. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int max;
|
||||
|
||||
/** The deadband maximum PWM value. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int deadbandMax;
|
||||
|
||||
/** The center PWM value. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int center;
|
||||
|
||||
/** The deadband minimum PWM value. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int deadbandMin;
|
||||
|
||||
/** The minimum PWM value. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int min;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PWMJNI extends DIOJNI {
|
||||
public static native int initializePWMPort(int halPortHandle);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PortsJNI extends JNIWrapper {
|
||||
public static native int getNumAccumulators();
|
||||
|
||||
|
||||
@@ -4,86 +4,60 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public class PowerDistributionFaults {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel0BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel1BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel2BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel3BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel4BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel5BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel6BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel7BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel8BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel9BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel10BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel11BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel12BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel13BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel14BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel15BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel16BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel17BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel18BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel19BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel20BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel21BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel22BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel23BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Brownout;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanWarning;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean HardwareFault;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PowerDistributionJNI extends JNIWrapper {
|
||||
public static final int AUTOMATIC_TYPE = 0;
|
||||
public static final int CTRE_TYPE = 1;
|
||||
|
||||
@@ -4,89 +4,62 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public class PowerDistributionStickyFaults {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel0BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel1BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel2BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel3BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel4BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel5BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel6BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel7BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel8BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel9BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel10BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel11BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel12BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel13BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel14BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel15BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel16BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel17BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel18BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel19BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel20BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel21BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel22BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel23BreakerFault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Brownout;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanWarning;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanBusOff;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean HasReset;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,23 +4,18 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public class PowerDistributionVersion {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareMajor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareMinor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareFix;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int hardwareMinor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int hardwareMajor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int uniqueId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,72 +4,50 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@SuppressWarnings("MemberName")
|
||||
public class REVPHFaults {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel0Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel1Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel2Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel3Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel4Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel5Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel6Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel7Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel8Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel9Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel10Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel11Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel12Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel13Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel14Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Channel15Fault;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CompressorOverCurrent;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CompressorOpen;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean SolenoidOverCurrent;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Brownout;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanWarning;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean HardwareFault;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class REVPHJNI extends JNIWrapper {
|
||||
public static final int COMPRESSOR_CONFIG_TYPE_DISABLED = 0;
|
||||
public static final int COMPRESSOR_CONFIG_TYPE_DIGITAL = 1;
|
||||
|
||||
@@ -4,27 +4,20 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@SuppressWarnings("MemberName")
|
||||
public class REVPHStickyFaults {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CompressorOverCurrent;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CompressorOpen;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean SolenoidOverCurrent;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean Brownout;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanWarning;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean CanBusOff;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final boolean HasReset;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,24 +4,18 @@
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@SuppressWarnings("MemberName")
|
||||
public class REVPHVersion {
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareMajor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareMinor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int firmwareFix;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int hardwareMinor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int hardwareMajor;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int uniqueId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,6 @@ package edu.wpi.first.hal;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class SPIJNI extends JNIWrapper {
|
||||
public static final int INVALID_PORT = -1;
|
||||
public static final int ONBOARD_CS0_PORT = 0;
|
||||
|
||||
@@ -8,7 +8,7 @@ import edu.wpi.first.hal.JNIWrapper;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@SuppressWarnings("MethodName")
|
||||
public class CANJNI extends JNIWrapper {
|
||||
public static final int CAN_SEND_PERIOD_NO_REPEAT = 0;
|
||||
public static final int CAN_SEND_PERIOD_STOP_REPEATING = -1;
|
||||
@@ -17,14 +17,11 @@ public class CANJNI extends JNIWrapper {
|
||||
public static final int CAN_IS_FRAME_REMOTE = 0x80000000;
|
||||
public static final int CAN_IS_FRAME_11BIT = 0x40000000;
|
||||
|
||||
@SuppressWarnings("MethodName")
|
||||
public static native void FRCNetCommCANSessionMuxSendMessage(
|
||||
int messageID, byte[] data, int periodMs);
|
||||
|
||||
@SuppressWarnings("MethodName")
|
||||
public static native byte[] FRCNetCommCANSessionMuxReceiveMessage(
|
||||
IntBuffer messageID, int messageIDMask, ByteBuffer timeStamp);
|
||||
|
||||
@SuppressWarnings("MethodName")
|
||||
public static native void getCANStatus(CANStatus status);
|
||||
}
|
||||
|
||||
@@ -5,28 +5,32 @@
|
||||
package edu.wpi.first.hal.can;
|
||||
|
||||
/** Structure for holding the result of a CAN Status request. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public class CANStatus {
|
||||
/** The utilization of the CAN Bus. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public double percentBusUtilization;
|
||||
|
||||
/** The CAN Bus off count. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int busOffCount;
|
||||
|
||||
/** The CAN Bus TX full count. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int txFullCount;
|
||||
|
||||
/** The CAN Bus receive error count. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int receiveErrorCount;
|
||||
|
||||
/** The CAN Bus transmit error count. */
|
||||
@SuppressWarnings("MemberName")
|
||||
public int transmitErrorCount;
|
||||
|
||||
@SuppressWarnings("MissingJavadocMethod")
|
||||
/**
|
||||
* Set CAN bus status.
|
||||
*
|
||||
* @param percentBusUtilization CAN bus utilization as a percent.
|
||||
* @param busOffCount Bus off event count.
|
||||
* @param txFullCount TX buffer full event count.
|
||||
* @param receiveErrorCount Receive error event count.
|
||||
* @param transmitErrorCount Transmit error event count.
|
||||
*/
|
||||
public void setStatus(
|
||||
double percentBusUtilization,
|
||||
int busOffCount,
|
||||
|
||||
@@ -6,7 +6,6 @@ package edu.wpi.first.hal.simulation;
|
||||
|
||||
import edu.wpi.first.hal.JNIWrapper;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class CTREPCMDataJNI extends JNIWrapper {
|
||||
public static native int registerInitializedCallback(
|
||||
int index, NotifyCallback callback, boolean initialNotify);
|
||||
|
||||
@@ -6,7 +6,6 @@ package edu.wpi.first.hal.simulation;
|
||||
|
||||
import edu.wpi.first.hal.JNIWrapper;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class REVPHDataJNI extends JNIWrapper {
|
||||
public static native int registerInitializedCallback(
|
||||
int index, NotifyCallback callback, boolean initialNotify);
|
||||
|
||||
@@ -7,17 +7,13 @@ package edu.wpi.first.hal.simulation;
|
||||
import edu.wpi.first.hal.JNIWrapper;
|
||||
|
||||
public class RoboRioDataJNI extends JNIWrapper {
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native int registerFPGAButtonCallback(
|
||||
NotifyCallback callback, boolean initialNotify);
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native void cancelFPGAButtonCallback(int uid);
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native boolean getFPGAButton();
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static native void setFPGAButton(boolean fPGAButton);
|
||||
|
||||
public static native int registerVInVoltageCallback(
|
||||
|
||||
@@ -28,18 +28,21 @@ public class SimDeviceDataJNI extends JNIWrapper {
|
||||
|
||||
public static native int getSimValueDeviceHandle(int handle);
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public static class SimDeviceInfo {
|
||||
@SuppressWarnings("JavadocMethod")
|
||||
public String name;
|
||||
public int handle;
|
||||
|
||||
/**
|
||||
* SimDeviceInfo constructor.
|
||||
*
|
||||
* @param name SimDevice name.
|
||||
* @param handle SimDevice handle.
|
||||
*/
|
||||
public SimDeviceInfo(String name, int handle) {
|
||||
this.name = name;
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public String name;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public int handle;
|
||||
}
|
||||
|
||||
public static native SimDeviceInfo[] enumerateSimDevices(String prefix);
|
||||
@@ -70,8 +73,23 @@ public class SimDeviceDataJNI extends JNIWrapper {
|
||||
|
||||
public static native int getSimValueHandle(int device, String name);
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public static class SimValueInfo {
|
||||
@SuppressWarnings("JavadocMethod")
|
||||
public String name;
|
||||
public int handle;
|
||||
public int direction;
|
||||
public HALValue value;
|
||||
|
||||
/**
|
||||
* SimValueInfo constructor.
|
||||
*
|
||||
* @param name SimValue name.
|
||||
* @param handle SimValue handle.
|
||||
* @param direction SimValue direction.
|
||||
* @param type SimValue type.
|
||||
* @param value1 Value 1.
|
||||
* @param value2 Value 2.
|
||||
*/
|
||||
public SimValueInfo(
|
||||
String name, int handle, int direction, int type, long value1, double value2) {
|
||||
this.name = name;
|
||||
@@ -79,18 +97,6 @@ public class SimDeviceDataJNI extends JNIWrapper {
|
||||
this.direction = direction;
|
||||
this.value = HALValue.fromNative(type, value1, value2);
|
||||
}
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public String name;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public int handle;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public int direction;
|
||||
|
||||
@SuppressWarnings("MemberName")
|
||||
public HALValue value;
|
||||
}
|
||||
|
||||
public static native SimValueInfo[] enumerateSimValues(int device);
|
||||
|
||||
Reference in New Issue
Block a user