mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[hal] Add SystemCore to Java runtime type (#7932)
This commit is contained in:
@@ -43,6 +43,9 @@ public final class HALUtil extends JNIWrapper {
|
|||||||
/** Simulation runtime. */
|
/** Simulation runtime. */
|
||||||
public static final int RUNTIME_SIMULATION = 2;
|
public static final int RUNTIME_SIMULATION = 2;
|
||||||
|
|
||||||
|
/** SystemCore. */
|
||||||
|
public static final int RUNTIME_SYSTEMCORE = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the FPGA Version number.
|
* Returns the FPGA Version number.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_ROBORIO2 ==
|
|||||||
HAL_Runtime_RoboRIO2);
|
HAL_Runtime_RoboRIO2);
|
||||||
static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_SIMULATION ==
|
static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_SIMULATION ==
|
||||||
HAL_Runtime_Simulation);
|
HAL_Runtime_Simulation);
|
||||||
|
static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_SYSTEMCORE ==
|
||||||
|
HAL_Runtime_SystemCore);
|
||||||
|
|
||||||
static JavaVM* jvm = nullptr;
|
static JavaVM* jvm = nullptr;
|
||||||
static JException illegalArgExCls;
|
static JException illegalArgExCls;
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ public enum RuntimeType {
|
|||||||
/** roboRIO 2.0. */
|
/** roboRIO 2.0. */
|
||||||
kRoboRIO2(HALUtil.RUNTIME_ROBORIO2),
|
kRoboRIO2(HALUtil.RUNTIME_ROBORIO2),
|
||||||
/** Simulation runtime. */
|
/** Simulation runtime. */
|
||||||
kSimulation(HALUtil.RUNTIME_SIMULATION);
|
kSimulation(HALUtil.RUNTIME_SIMULATION),
|
||||||
|
/** SystemCore. */
|
||||||
|
kSystemCore(HALUtil.RUNTIME_SYSTEMCORE);
|
||||||
|
|
||||||
/** RuntimeType value. */
|
/** RuntimeType value. */
|
||||||
public final int value;
|
public final int value;
|
||||||
@@ -32,6 +34,7 @@ public enum RuntimeType {
|
|||||||
return switch (type) {
|
return switch (type) {
|
||||||
case HALUtil.RUNTIME_ROBORIO -> RuntimeType.kRoboRIO;
|
case HALUtil.RUNTIME_ROBORIO -> RuntimeType.kRoboRIO;
|
||||||
case HALUtil.RUNTIME_ROBORIO2 -> RuntimeType.kRoboRIO2;
|
case HALUtil.RUNTIME_ROBORIO2 -> RuntimeType.kRoboRIO2;
|
||||||
|
case HALUtil.RUNTIME_SYSTEMCORE -> RuntimeType.kSystemCore;
|
||||||
default -> RuntimeType.kSimulation;
|
default -> RuntimeType.kSimulation;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user