mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Add ability to run robot main loop in a separate thread (#1895)
Default behavior is still to run the robot main loop in the main thread. The ability to run the robot main loop in a separate thread and add a hook for running a different function in the main thread is needed for simulation GUI support on some platforms.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -18,6 +18,12 @@ public final class HAL extends JNIWrapper {
|
||||
|
||||
public static native boolean initialize(int timeout, int mode);
|
||||
|
||||
public static native boolean hasMain();
|
||||
|
||||
public static native void runMain();
|
||||
|
||||
public static native void exitMain();
|
||||
|
||||
public static native void observeUserProgramStarting();
|
||||
|
||||
public static native void observeUserProgramDisabled();
|
||||
|
||||
Reference in New Issue
Block a user