mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[hal] Rename SimValueCallback2 to SimValueCallback (#3212)
This commit is contained in:
@@ -47,17 +47,11 @@ public class SimDeviceDataJNI extends JNIWrapper {
|
||||
public static native int registerSimValueCreatedCallback(
|
||||
int device, SimValueCallback callback, boolean initialNotify);
|
||||
|
||||
public static native int registerSimValueCreatedCallback2(
|
||||
int device, SimValueCallback2 callback, boolean initialNotify);
|
||||
|
||||
public static native void cancelSimValueCreatedCallback(int uid);
|
||||
|
||||
public static native int registerSimValueChangedCallback(
|
||||
int handle, SimValueCallback callback, boolean initialNotify);
|
||||
|
||||
public static native int registerSimValueChangedCallback2(
|
||||
int handle, SimValueCallback2 callback, boolean initialNotify);
|
||||
|
||||
public static native void cancelSimValueChangedCallback(int uid);
|
||||
|
||||
/**
|
||||
@@ -69,7 +63,7 @@ public class SimDeviceDataJNI extends JNIWrapper {
|
||||
* @param initialNotify ignored (present for consistency)
|
||||
*/
|
||||
public static native int registerSimValueResetCallback(
|
||||
int handle, SimValueCallback2 callback, boolean initialNotify);
|
||||
int handle, SimValueCallback callback, boolean initialNotify);
|
||||
|
||||
public static native void cancelSimValueResetCallback(int uid);
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import edu.wpi.first.hal.HALValue;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface SimValueCallback {
|
||||
void callback(String name, int handle, boolean readonly, HALValue value);
|
||||
void callback(String name, int handle, int direction, HALValue value);
|
||||
|
||||
default void callbackNative(
|
||||
String name, int handle, boolean readonly, int type, long value1, double value2) {
|
||||
callback(name, handle, readonly, HALValue.fromNative(type, value1, value2));
|
||||
String name, int handle, int direction, int type, long value1, double value2) {
|
||||
callback(name, handle, direction, HALValue.fromNative(type, value1, value2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.hal.simulation;
|
||||
|
||||
import edu.wpi.first.hal.HALValue;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface SimValueCallback2 {
|
||||
void callback(String name, int handle, int direction, HALValue value);
|
||||
|
||||
default void callbackNative(
|
||||
String name, int handle, int direction, int type, long value1, double value2) {
|
||||
callback(name, handle, direction, HALValue.fromNative(type, value1, value2));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user