mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Rename CreateEvent and CreateSemaphore to Make (#8710)
CreateEvent and CreateSemaphore are macros in Windows.h, which causes a ton of trouble. Just rename the functions. Closes #7303 Replaces #7336
This commit is contained in:
@@ -595,7 +595,7 @@ public abstract class OpModeRobot extends RobotBase {
|
||||
public final void startCompetition() {
|
||||
System.out.println("********** Robot program startup complete **********");
|
||||
|
||||
int event = WPIUtilJNI.createEvent(false, false);
|
||||
int event = WPIUtilJNI.makeEvent(false, false);
|
||||
DriverStationJNI.provideNewDataEventHandle(event);
|
||||
|
||||
m_notifier = NotifierJNI.createNotifier();
|
||||
@@ -690,7 +690,7 @@ public abstract class OpModeRobot extends RobotBase {
|
||||
|
||||
if (m_word.isEnabled()) {
|
||||
// When enabled, call the opmode run function, then close and clear
|
||||
int endMonitor = WPIUtilJNI.createEvent(true, false);
|
||||
int endMonitor = WPIUtilJNI.makeEvent(true, false);
|
||||
Thread curThread = Thread.currentThread();
|
||||
Thread monitor =
|
||||
new Thread(
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract class MotorSafety {
|
||||
|
||||
@SuppressWarnings("PMD.AssignmentInOperand")
|
||||
private static void threadMain() {
|
||||
int event = WPIUtilJNI.createEvent(false, false);
|
||||
int event = WPIUtilJNI.makeEvent(false, false);
|
||||
DriverStationJNI.provideNewDataEventHandle(event);
|
||||
ControlWord controlWord = new ControlWord();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.wpilib.util.WPIUtilJNI;
|
||||
public class DriverStationModeThread implements AutoCloseable {
|
||||
private final AtomicBoolean m_keepAlive = new AtomicBoolean(true);
|
||||
private final AtomicLong m_userControlWord;
|
||||
private final int m_handle = WPIUtilJNI.createEvent(false, false);
|
||||
private final int m_handle = WPIUtilJNI.makeEvent(false, false);
|
||||
private final Thread m_thread;
|
||||
|
||||
/**
|
||||
|
||||
@@ -311,7 +311,7 @@ public final class DriverStationSim {
|
||||
|
||||
/** Updates DriverStation data so that new values are visible to the user program. */
|
||||
public static void notifyNewData() {
|
||||
int handle = WPIUtilJNI.createEvent(false, false);
|
||||
int handle = WPIUtilJNI.makeEvent(false, false);
|
||||
DriverStationJNI.provideNewDataEventHandle(handle);
|
||||
DriverStationDataJNI.notifyNewData();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user