Skip to content

Add systemcore to java runtime type #7932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hal/src/main/java/edu/wpi/first/hal/HALUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public final class HALUtil extends JNIWrapper {
/** Simulation runtime. */
public static final int RUNTIME_SIMULATION = 2;

/** SystemCore. */
public static final int RUNTIME_SYSTEMCORE = 3;

/**
* Returns the FPGA Version number.
*
Expand Down
2 changes: 2 additions & 0 deletions hal/src/main/native/cpp/jni/HALUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_ROBORIO2 ==
HAL_Runtime_RoboRIO2);
static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_SIMULATION ==
HAL_Runtime_Simulation);
static_assert(edu_wpi_first_hal_HALUtil_RUNTIME_SYSTEMCORE ==
HAL_Runtime_SystemCore);

static JavaVM* jvm = nullptr;
static JException illegalArgExCls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public enum RuntimeType {
/** roboRIO 2.0. */
kRoboRIO2(HALUtil.RUNTIME_ROBORIO2),
/** Simulation runtime. */
kSimulation(HALUtil.RUNTIME_SIMULATION);
kSimulation(HALUtil.RUNTIME_SIMULATION),
/** SystemCore. */
kSystemCore(HALUtil.RUNTIME_SYSTEMCORE);

/** RuntimeType value. */
public final int value;
Expand All @@ -32,6 +34,7 @@ public static RuntimeType getValue(int type) {
return switch (type) {
case HALUtil.RUNTIME_ROBORIO -> RuntimeType.kRoboRIO;
case HALUtil.RUNTIME_ROBORIO2 -> RuntimeType.kRoboRIO2;
case HALUtil.RUNTIME_SYSTEMCORE -> RuntimeType.kSystemCore;
default -> RuntimeType.kSimulation;
};
}
Expand Down
Loading