mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[sim] Add Java wrapper for getProgramStarted (#2566)
Also move SimHooks to wpilibj (to match wpilibc).
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2020 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package edu.wpi.first.wpilibj.simulation;
|
||||
|
||||
import edu.wpi.first.hal.simulation.SimulatorJNI;
|
||||
|
||||
public final class SimHooks {
|
||||
private SimHooks() {
|
||||
}
|
||||
|
||||
public static void setHALRuntimeType(int type) {
|
||||
SimulatorJNI.setRuntimeType(type);
|
||||
}
|
||||
|
||||
public static void waitForProgramStart() {
|
||||
SimulatorJNI.waitForProgramStart();
|
||||
}
|
||||
|
||||
public static void setProgramStarted() {
|
||||
SimulatorJNI.setProgramStarted();
|
||||
}
|
||||
|
||||
public static boolean getProgramStarted() {
|
||||
return SimulatorJNI.getProgramStarted();
|
||||
}
|
||||
|
||||
public static void restartTiming() {
|
||||
SimulatorJNI.restartTiming();
|
||||
}
|
||||
|
||||
public static void pauseTiming() {
|
||||
SimulatorJNI.pauseTiming();
|
||||
}
|
||||
|
||||
public static void resumeTiming() {
|
||||
SimulatorJNI.resumeTiming();
|
||||
}
|
||||
|
||||
public static boolean isTimingPaused() {
|
||||
return SimulatorJNI.isTimingPaused();
|
||||
}
|
||||
|
||||
public static void stepTiming(long delta) {
|
||||
SimulatorJNI.stepTiming(delta);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user