From 7aa100589de48835974bc1ef405ab792d42d4cd9 Mon Sep 17 00:00:00 2001 From: Dean Brettle Date: Sun, 28 Jul 2024 14:30:19 -0700 Subject: [PATCH] [wpilib] Fix sim javadocs to not say GC will cancel callbacks (#6665) That behavior has not been present since PR #4158 was merged more than 2 years ago and imo should not be added back because it was surprising and not consistent with the most common use case of registering a callback permanently. --- .../wpilibj/simulation/AddressableLEDSim.java | 15 ++--- .../wpilibj/simulation/AnalogGyroSim.java | 9 +-- .../wpilibj/simulation/AnalogInputSim.java | 27 +++------ .../wpilibj/simulation/AnalogOutputSim.java | 6 +- .../wpilibj/simulation/AnalogTriggerSim.java | 9 +-- .../simulation/BuiltInAccelerometerSim.java | 15 ++--- .../first/wpilibj/simulation/CTREPCMSim.java | 3 +- .../wpi/first/wpilibj/simulation/DIOSim.java | 15 ++--- .../wpilibj/simulation/DigitalPWMSim.java | 9 +-- .../wpilibj/simulation/DriverStationSim.java | 24 +++----- .../wpilibj/simulation/DutyCycleSim.java | 9 +-- .../first/wpilibj/simulation/EncoderSim.java | 27 +++------ .../wpi/first/wpilibj/simulation/I2CSim.java | 9 +-- .../wpi/first/wpilibj/simulation/PDPSim.java | 12 ++-- .../wpi/first/wpilibj/simulation/PWMSim.java | 18 ++---- .../wpilibj/simulation/PneumaticsBaseSim.java | 15 ++--- .../first/wpilibj/simulation/REVPHSim.java | 3 +- .../first/wpilibj/simulation/RelaySim.java | 12 ++-- .../first/wpilibj/simulation/RoboRioSim.java | 57 +++++++------------ .../simulation/SPIAccelerometerSim.java | 15 ++--- .../wpi/first/wpilibj/simulation/SPISim.java | 12 ++-- .../wpilibj/simulation/SimDeviceSim.java | 15 ++--- .../first/wpilibj/simulation/SolenoidSim.java | 3 +- 23 files changed, 113 insertions(+), 226 deletions(-) diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java index bf543c03b3..83ef08e73f 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java @@ -65,8 +65,7 @@ public class AddressableLEDSim { * * @param callback the callback that will be called whenever the Initialized property is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = AddressableLEDDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -96,8 +95,7 @@ public class AddressableLEDSim { * * @param callback the callback that will be called whenever the output port is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerOutputPortCallback(NotifyCallback callback, boolean initialNotify) { int uid = AddressableLEDDataJNI.registerOutputPortCallback(m_index, callback, initialNotify); @@ -127,8 +125,7 @@ public class AddressableLEDSim { * * @param callback the callback that will be called whenever the length is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerLengthCallback(NotifyCallback callback, boolean initialNotify) { int uid = AddressableLEDDataJNI.registerLengthCallback(m_index, callback, initialNotify); @@ -158,8 +155,7 @@ public class AddressableLEDSim { * * @param callback the callback that will be called whenever the LED state is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerRunningCallback(NotifyCallback callback, boolean initialNotify) { int uid = AddressableLEDDataJNI.registerRunningCallback(m_index, callback, initialNotify); @@ -188,8 +184,7 @@ public class AddressableLEDSim { * Register a callback on the LED data. * * @param callback the callback that will be called whenever the LED data is changed - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerDataCallback(ConstBufferCallback callback) { int uid = AddressableLEDDataJNI.registerDataCallback(m_index, callback); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogGyroSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogGyroSim.java index 87217aa741..33712f312f 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogGyroSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogGyroSim.java @@ -35,8 +35,7 @@ public class AnalogGyroSim { * * @param callback the callback that will be called whenever the angle changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAngleCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogGyroDataJNI.registerAngleCallback(m_index, callback, initialNotify); @@ -66,8 +65,7 @@ public class AnalogGyroSim { * * @param callback the callback that will be called whenever the rate changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerRateCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogGyroDataJNI.registerRateCallback(m_index, callback, initialNotify); @@ -97,8 +95,7 @@ public class AnalogGyroSim { * * @param callback the callback that will be called whenever the gyro is initialized * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogGyroDataJNI.registerInitializedCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogInputSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogInputSim.java index 87dce71700..2f045b75dd 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogInputSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogInputSim.java @@ -35,8 +35,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the analog input is initialized * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogInDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -66,8 +65,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the number of average bits is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAverageBitsCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogInDataJNI.registerAverageBitsCallback(m_index, callback, initialNotify); @@ -97,8 +95,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the oversampling bits are changed. * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerOversampleBitsCallback( NotifyCallback callback, boolean initialNotify) { @@ -129,8 +126,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the voltage is changed. * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogInDataJNI.registerVoltageCallback(m_index, callback, initialNotify); @@ -160,8 +156,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the accumulator is initialized * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAccumulatorInitializedCallback( NotifyCallback callback, boolean initialNotify) { @@ -193,8 +188,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the accumulator value is changed. * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAccumulatorValueCallback( NotifyCallback callback, boolean initialNotify) { @@ -225,8 +219,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the accumulator count is changed. * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAccumulatorCountCallback( NotifyCallback callback, boolean initialNotify) { @@ -257,8 +250,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the accumulator center is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAccumulatorCenterCallback( NotifyCallback callback, boolean initialNotify) { @@ -289,8 +281,7 @@ public class AnalogInputSim { * * @param callback the callback that will be called whenever the accumulator deadband is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerAccumulatorDeadbandCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogOutputSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogOutputSim.java index 985fcd9527..5623c8eeb0 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogOutputSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogOutputSim.java @@ -35,8 +35,7 @@ public class AnalogOutputSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogOutDataJNI.registerVoltageCallback(m_index, callback, initialNotify); @@ -66,8 +65,7 @@ public class AnalogOutputSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogOutDataJNI.registerInitializedCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogTriggerSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogTriggerSim.java index 58d51b199f..fbc90e94d2 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogTriggerSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AnalogTriggerSim.java @@ -57,8 +57,7 @@ public class AnalogTriggerSim { * * @param callback the callback that will be called whenever the analog trigger is initialized * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = AnalogTriggerDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -88,8 +87,7 @@ public class AnalogTriggerSim { * * @param callback the callback that will be called whenever the lower bound is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerTriggerLowerBoundCallback( NotifyCallback callback, boolean initialNotify) { @@ -121,8 +119,7 @@ public class AnalogTriggerSim { * * @param callback the callback that will be called whenever the upper bound is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerTriggerUpperBoundCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/BuiltInAccelerometerSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/BuiltInAccelerometerSim.java index 8aba25aabe..b8ebd84c88 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/BuiltInAccelerometerSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/BuiltInAccelerometerSim.java @@ -32,8 +32,7 @@ public class BuiltInAccelerometerSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerActiveCallback(NotifyCallback callback, boolean initialNotify) { int uid = AccelerometerDataJNI.registerActiveCallback(m_index, callback, initialNotify); @@ -63,8 +62,7 @@ public class BuiltInAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerRangeCallback(NotifyCallback callback, boolean initialNotify) { int uid = AccelerometerDataJNI.registerRangeCallback(m_index, callback, initialNotify); @@ -94,8 +92,7 @@ public class BuiltInAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerXCallback(NotifyCallback callback, boolean initialNotify) { int uid = AccelerometerDataJNI.registerXCallback(m_index, callback, initialNotify); @@ -125,8 +122,7 @@ public class BuiltInAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerYCallback(NotifyCallback callback, boolean initialNotify) { int uid = AccelerometerDataJNI.registerYCallback(m_index, callback, initialNotify); @@ -156,8 +152,7 @@ public class BuiltInAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerZCallback(NotifyCallback callback, boolean initialNotify) { int uid = AccelerometerDataJNI.registerZCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CTREPCMSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CTREPCMSim.java index 3169a5db6a..d5d2c4a4e8 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CTREPCMSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CTREPCMSim.java @@ -57,8 +57,7 @@ public class CTREPCMSim extends PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerClosedLoopEnabledCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DIOSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DIOSim.java index 1ee158072e..ed8ca9bbc5 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DIOSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DIOSim.java @@ -45,8 +45,7 @@ public class DIOSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = DIODataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -76,8 +75,7 @@ public class DIOSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerValueCallback(NotifyCallback callback, boolean initialNotify) { int uid = DIODataJNI.registerValueCallback(m_index, callback, initialNotify); @@ -107,8 +105,7 @@ public class DIOSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPulseLengthCallback(NotifyCallback callback, boolean initialNotify) { int uid = DIODataJNI.registerPulseLengthCallback(m_index, callback, initialNotify); @@ -138,8 +135,7 @@ public class DIOSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerIsInputCallback(NotifyCallback callback, boolean initialNotify) { int uid = DIODataJNI.registerIsInputCallback(m_index, callback, initialNotify); @@ -169,8 +165,7 @@ public class DIOSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerFilterIndexCallback(NotifyCallback callback, boolean initialNotify) { int uid = DIODataJNI.registerFilterIndexCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DigitalPWMSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DigitalPWMSim.java index f18f092b80..14a95639e3 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DigitalPWMSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DigitalPWMSim.java @@ -62,8 +62,7 @@ public class DigitalPWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = DigitalPWMDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -93,8 +92,7 @@ public class DigitalPWMSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerDutyCycleCallback(NotifyCallback callback, boolean initialNotify) { int uid = DigitalPWMDataJNI.registerDutyCycleCallback(m_index, callback, initialNotify); @@ -124,8 +122,7 @@ public class DigitalPWMSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPinCallback(NotifyCallback callback, boolean initialNotify) { int uid = DigitalPWMDataJNI.registerPinCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DriverStationSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DriverStationSim.java index 971ce4332f..52f733dc04 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DriverStationSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DriverStationSim.java @@ -22,8 +22,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the enabled state is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerEnabledCallback( NotifyCallback callback, boolean initialNotify) { @@ -54,8 +53,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called on autonomous mode entrance/exit * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerAutonomousCallback( NotifyCallback callback, boolean initialNotify) { @@ -86,8 +84,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the test mode is entered or left * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerTestCallback(NotifyCallback callback, boolean initialNotify) { int uid = DriverStationDataJNI.registerTestCallback(callback, initialNotify); @@ -117,8 +114,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the eStop state changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerEStopCallback( NotifyCallback callback, boolean initialNotify) { @@ -149,8 +145,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the FMS connection changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerFmsAttachedCallback( NotifyCallback callback, boolean initialNotify) { @@ -181,8 +176,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the DS connection changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerDsAttachedCallback( NotifyCallback callback, boolean initialNotify) { @@ -213,8 +207,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever the alliance station changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerAllianceStationIdCallback( NotifyCallback callback, boolean initialNotify) { @@ -264,8 +257,7 @@ public final class DriverStationSim { * * @param callback the callback that will be called whenever match time changes * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerMatchTimeCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DutyCycleSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DutyCycleSim.java index e8939543bd..7042a282a4 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DutyCycleSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DutyCycleSim.java @@ -57,8 +57,7 @@ public class DutyCycleSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = DutyCycleDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -88,8 +87,7 @@ public class DutyCycleSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerFrequencyCallback(NotifyCallback callback, boolean initialNotify) { int uid = DutyCycleDataJNI.registerFrequencyCallback(m_index, callback, initialNotify); @@ -119,8 +117,7 @@ public class DutyCycleSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerOutputCallback(NotifyCallback callback, boolean initialNotify) { int uid = DutyCycleDataJNI.registerOutputCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/EncoderSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/EncoderSim.java index 4bc12dc8e1..85f34f56d9 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/EncoderSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/EncoderSim.java @@ -58,8 +58,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the Initialized property is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -89,8 +88,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the count property is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerCountCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerCountCallback(m_index, callback, initialNotify); @@ -120,8 +118,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the period is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPeriodCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerPeriodCallback(m_index, callback, initialNotify); @@ -151,8 +148,7 @@ public class EncoderSim { * * @param callback the callback * @param initialNotify whether to run the callback on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerResetCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerResetCallback(m_index, callback, initialNotify); @@ -182,8 +178,7 @@ public class EncoderSim { * * @param callback the callback * @param initialNotify whether to run the callback on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerMaxPeriodCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerMaxPeriodCallback(m_index, callback, initialNotify); @@ -213,8 +208,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the direction is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerDirectionCallback(NotifyCallback callback, boolean initialNotify) { int uid = EncoderDataJNI.registerDirectionCallback(m_index, callback, initialNotify); @@ -244,8 +238,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the reverse direction is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerReverseDirectionCallback( NotifyCallback callback, boolean initialNotify) { @@ -276,8 +269,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the samples-to-average is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerSamplesToAverageCallback( NotifyCallback callback, boolean initialNotify) { @@ -308,8 +300,7 @@ public class EncoderSim { * * @param callback the callback that will be called whenever the distance per pulse is changed * @param initialNotify if true, the callback will be run on the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerDistancePerPulseCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/I2CSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/I2CSim.java index 986e310a8a..7e76e5c07c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/I2CSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/I2CSim.java @@ -27,8 +27,7 @@ public class I2CSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = I2CDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -57,8 +56,7 @@ public class I2CSim { * Register a callback to be run whenever a `read` operation is done. * * @param callback the callback that is run on `read` operations - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerReadCallback(BufferCallback callback) { int uid = I2CDataJNI.registerReadCallback(m_index, callback); @@ -69,8 +67,7 @@ public class I2CSim { * Register a callback to be run whenever a `write` operation is done. * * @param callback the callback that is run on `write` operations - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerWriteCallback(ConstBufferCallback callback) { int uid = I2CDataJNI.registerWriteCallback(m_index, callback); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PDPSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PDPSim.java index eef8ccf1ee..8a0f2c0ade 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PDPSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PDPSim.java @@ -40,8 +40,7 @@ public class PDPSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = @@ -72,8 +71,7 @@ public class PDPSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerTemperatureCallback(NotifyCallback callback, boolean initialNotify) { int uid = @@ -104,8 +102,7 @@ public class PDPSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerVoltageCallback(NotifyCallback callback, boolean initialNotify) { int uid = PowerDistributionDataJNI.registerVoltageCallback(m_index, callback, initialNotify); @@ -136,8 +133,7 @@ public class PDPSim { * @param channel the channel * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerCurrentCallback( int channel, NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PWMSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PWMSim.java index ca986290d8..a415c80d92 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PWMSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PWMSim.java @@ -45,8 +45,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = PWMDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -76,8 +75,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPulseMicrosecondCallback( NotifyCallback callback, boolean initialNotify) { @@ -108,8 +106,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerSpeedCallback(NotifyCallback callback, boolean initialNotify) { int uid = PWMDataJNI.registerSpeedCallback(m_index, callback, initialNotify); @@ -139,8 +136,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPositionCallback(NotifyCallback callback, boolean initialNotify) { int uid = PWMDataJNI.registerPositionCallback(m_index, callback, initialNotify); @@ -170,8 +166,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerPeriodScaleCallback(NotifyCallback callback, boolean initialNotify) { int uid = PWMDataJNI.registerPeriodScaleCallback(m_index, callback, initialNotify); @@ -201,8 +196,7 @@ public class PWMSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerZeroLatchCallback(NotifyCallback callback, boolean initialNotify) { int uid = PWMDataJNI.registerZeroLatchCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PneumaticsBaseSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PneumaticsBaseSim.java index cb40d5ab9a..4b993f9b47 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PneumaticsBaseSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/PneumaticsBaseSim.java @@ -64,8 +64,7 @@ public abstract class PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public abstract CallbackStore registerInitializedCallback( NotifyCallback callback, boolean initialNotify); @@ -89,8 +88,7 @@ public abstract class PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public abstract CallbackStore registerCompressorOnCallback( NotifyCallback callback, boolean initialNotify); @@ -117,8 +115,7 @@ public abstract class PneumaticsBaseSim { * @param channel the channel to monitor * @param callback the callback * @param initialNotify should the callback be run with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public abstract CallbackStore registerSolenoidOutputCallback( int channel, NotifyCallback callback, boolean initialNotify); @@ -142,8 +139,7 @@ public abstract class PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public abstract CallbackStore registerPressureSwitchCallback( NotifyCallback callback, boolean initialNotify); @@ -167,8 +163,7 @@ public abstract class PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public abstract CallbackStore registerCompressorCurrentCallback( NotifyCallback callback, boolean initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/REVPHSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/REVPHSim.java index 055cecced2..26e2c6712e 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/REVPHSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/REVPHSim.java @@ -57,8 +57,7 @@ public class REVPHSim extends PneumaticsBaseSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerCompressorConfigTypeCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RelaySim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RelaySim.java index b6f25420f3..e47589ca5a 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RelaySim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RelaySim.java @@ -35,8 +35,7 @@ public class RelaySim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedForwardCallback( NotifyCallback callback, boolean initialNotify) { @@ -67,8 +66,7 @@ public class RelaySim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedReverseCallback( NotifyCallback callback, boolean initialNotify) { @@ -99,8 +97,7 @@ public class RelaySim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerForwardCallback(NotifyCallback callback, boolean initialNotify) { int uid = RelayDataJNI.registerForwardCallback(m_index, callback, initialNotify); @@ -130,8 +127,7 @@ public class RelaySim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerReverseCallback(NotifyCallback callback, boolean initialNotify) { int uid = RelayDataJNI.registerReverseCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RoboRioSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RoboRioSim.java index e2bc895127..d347999cee 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RoboRioSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/RoboRioSim.java @@ -20,8 +20,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerFPGAButtonCallback( NotifyCallback callback, boolean initialNotify) { @@ -52,8 +51,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerVInVoltageCallback( NotifyCallback callback, boolean initialNotify) { @@ -84,8 +82,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerVInCurrentCallback( NotifyCallback callback, boolean initialNotify) { @@ -116,8 +113,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserVoltage6VCallback( NotifyCallback callback, boolean initialNotify) { @@ -148,8 +144,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserCurrent6VCallback( NotifyCallback callback, boolean initialNotify) { @@ -180,8 +175,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserActive6VCallback( NotifyCallback callback, boolean initialNotify) { @@ -212,8 +206,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserVoltage5VCallback( NotifyCallback callback, boolean initialNotify) { @@ -244,8 +237,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserCurrent5VCallback( NotifyCallback callback, boolean initialNotify) { @@ -276,8 +268,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserActive5VCallback( NotifyCallback callback, boolean initialNotify) { @@ -308,8 +299,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserVoltage3V3Callback( NotifyCallback callback, boolean initialNotify) { @@ -340,8 +330,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserCurrent3V3Callback( NotifyCallback callback, boolean initialNotify) { @@ -372,8 +361,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserActive3V3Callback( NotifyCallback callback, boolean initialNotify) { @@ -404,8 +392,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserFaults6VCallback( NotifyCallback callback, boolean initialNotify) { @@ -436,8 +423,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserFaults5VCallback( NotifyCallback callback, boolean initialNotify) { @@ -468,8 +454,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether the callback should be called with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerUserFaults3V3Callback( NotifyCallback callback, boolean initialNotify) { @@ -500,8 +485,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerBrownoutVoltageCallback( NotifyCallback callback, boolean initialNotify) { @@ -532,8 +516,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerCPUTempCallback( NotifyCallback callback, boolean initialNotify) { @@ -564,8 +547,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerTeamNumberCallback( NotifyCallback callback, boolean initialNotify) { @@ -632,8 +614,7 @@ public final class RoboRioSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerRadioLEDStateCallback( NotifyCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPIAccelerometerSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPIAccelerometerSim.java index 24e3cca4ee..bd1490cea9 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPIAccelerometerSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPIAccelerometerSim.java @@ -25,8 +25,7 @@ public class SPIAccelerometerSim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerActiveCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIAccelerometerDataJNI.registerActiveCallback(m_index, callback, initialNotify); @@ -56,8 +55,7 @@ public class SPIAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerRangeCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIAccelerometerDataJNI.registerRangeCallback(m_index, callback, initialNotify); @@ -87,8 +85,7 @@ public class SPIAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerXCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIAccelerometerDataJNI.registerXCallback(m_index, callback, initialNotify); @@ -118,8 +115,7 @@ public class SPIAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerYCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIAccelerometerDataJNI.registerYCallback(m_index, callback, initialNotify); @@ -149,8 +145,7 @@ public class SPIAccelerometerSim { * * @param callback the callback * @param initialNotify whether to call the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerZCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIAccelerometerDataJNI.registerZCallback(m_index, callback, initialNotify); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPISim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPISim.java index 8ce955418a..7a3e2a5f4d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPISim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SPISim.java @@ -24,8 +24,7 @@ public class SPISim { * * @param callback the callback * @param initialNotify whether to run the callback with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerInitializedCallback(NotifyCallback callback, boolean initialNotify) { int uid = SPIDataJNI.registerInitializedCallback(m_index, callback, initialNotify); @@ -54,8 +53,7 @@ public class SPISim { * Register a callback to be run whenever a `read` operation is executed. * * @param callback the callback - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerReadCallback(BufferCallback callback) { int uid = SPIDataJNI.registerReadCallback(m_index, callback); @@ -66,8 +64,7 @@ public class SPISim { * Register a callback to be run whenever a `write` operation is executed. * * @param callback the callback - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerWriteCallback(ConstBufferCallback callback) { int uid = SPIDataJNI.registerWriteCallback(m_index, callback); @@ -78,8 +75,7 @@ public class SPISim { * Register a callback to be run whenever an auto receive buffer is received. * * @param callback the callback - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerReadAutoReceiveBufferCallback( SpiReadAutoReceiveBufferCallback callback) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SimDeviceSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SimDeviceSim.java index a64e2f33af..32620d8f26 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SimDeviceSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SimDeviceSim.java @@ -183,8 +183,7 @@ public class SimDeviceSim { * * @param callback the callback * @param initialNotify should the callback be run with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerValueCreatedCallback( SimValueCallback callback, boolean initialNotify) { @@ -198,8 +197,7 @@ public class SimDeviceSim { * @param value simulated value * @param callback the callback * @param initialNotify should the callback be run with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerValueChangedCallback( SimValue value, SimValueCallback callback, boolean initialNotify) { @@ -216,8 +214,7 @@ public class SimDeviceSim { * @param value simulated value * @param callback callback * @param initialNotify ignored (present for consistency) - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerValueResetCallback( SimValue value, SimValueCallback callback, boolean initialNotify) { @@ -243,8 +240,7 @@ public class SimDeviceSim { * @param prefix the prefix to filter sim devices * @param callback the callback * @param initialNotify should the callback be run with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerDeviceCreatedCallback( String prefix, SimDeviceCallback callback, boolean initialNotify) { @@ -259,8 +255,7 @@ public class SimDeviceSim { * @param prefix the prefix to filter sim devices * @param callback the callback * @param initialNotify should the callback be run with the initial state - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public static CallbackStore registerDeviceFreedCallback( String prefix, SimDeviceCallback callback, boolean initialNotify) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SolenoidSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SolenoidSim.java index 39d3cc2c5c..af767d211e 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SolenoidSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SolenoidSim.java @@ -68,8 +68,7 @@ public class SolenoidSim { * * @param callback the callback * @param initialNotify should the callback be run with the initial value - * @return the {@link CallbackStore} object associated with this callback. Save a reference to - * this object so GC doesn't cancel the callback. + * @return the {@link CallbackStore} object associated with this callback. */ public CallbackStore registerOutputCallback(NotifyCallback callback, boolean initialNotify) { return m_module.registerSolenoidOutputCallback(m_channel, callback, initialNotify);