diff --git a/hal/src/main/java/edu/wpi/first/hal/HALUtil.java b/hal/src/main/java/edu/wpi/first/hal/HALUtil.java index f4b9da907c..0913499910 100644 --- a/hal/src/main/java/edu/wpi/first/hal/HALUtil.java +++ b/hal/src/main/java/edu/wpi/first/hal/HALUtil.java @@ -46,28 +46,6 @@ public final class HALUtil extends JNIWrapper { /** SystemCore. */ public static final int RUNTIME_SYSTEMCORE = 3; - /** - * Returns the FPGA Version number. - * - *

For now, expect this to be competition year. - * - * @return FPGA Version number. - * @see "HAL_GetFPGAVersion" - */ - public static native short getFPGAVersion(); - - /** - * Returns the FPGA Revision number. - * - *

The format of the revision is 3 numbers. The 12 most significant bits are the Major - * Revision. the next 8 bits are the Minor Revision. The 12 least significant bits are the Build - * Number. - * - * @return FPGA Revision number. - * @see "HAL_GetFPGARevision" - */ - public static native int getFPGARevision(); - /** * Returns the roboRIO serial number. * diff --git a/hal/src/main/native/cpp/jni/HALUtil.cpp b/hal/src/main/native/cpp/jni/HALUtil.cpp index 4884f0ae79..16166887a6 100644 --- a/hal/src/main/native/cpp/jni/HALUtil.cpp +++ b/hal/src/main/native/cpp/jni/HALUtil.cpp @@ -362,36 +362,6 @@ JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) { jvm = nullptr; } -/* - * Class: edu_wpi_first_hal_HALUtil - * Method: getFPGAVersion - * Signature: ()S - */ -JNIEXPORT jshort JNICALL -Java_edu_wpi_first_hal_HALUtil_getFPGAVersion - (JNIEnv* env, jclass) -{ - int32_t status = 0; - jshort returnValue = HAL_GetFPGAVersion(&status); - CheckStatus(env, status); - return returnValue; -} - -/* - * Class: edu_wpi_first_hal_HALUtil - * Method: getFPGARevision - * Signature: ()I - */ -JNIEXPORT jint JNICALL -Java_edu_wpi_first_hal_HALUtil_getFPGARevision - (JNIEnv* env, jclass) -{ - int32_t status = 0; - jint returnValue = HAL_GetFPGARevision(&status); - CheckStatus(env, status); - return returnValue; -} - /* * Class: edu_wpi_first_hal_HALUtil * Method: getSerialNumber diff --git a/hal/src/main/native/include/hal/HALBase.h b/hal/src/main/native/include/hal/HALBase.h index 7d128c0b3f..c0a680d2eb 100644 --- a/hal/src/main/native/include/hal/HALBase.h +++ b/hal/src/main/native/include/hal/HALBase.h @@ -63,29 +63,6 @@ const char* HAL_GetLastError(int32_t* status); */ const char* HAL_GetErrorMessage(int32_t code); -/** - * Returns the FPGA Version number. - * - * For now, expect this to be competition year. - * - * @param[out] status the error code, or 0 for success - * @return FPGA Version number. - */ -int32_t HAL_GetFPGAVersion(int32_t* status); - -/** - * Returns the FPGA Revision number. - * - * The format of the revision is 3 numbers. - * The 12 most significant bits are the Major Revision. - * the next 8 bits are the Minor Revision. - * The 12 least significant bits are the Build Number. - * - * @param[out] status the error code, or 0 for success - * @return FPGA Revision number. - */ -int64_t HAL_GetFPGARevision(int32_t* status); - /** * Returns the roboRIO serial number. * diff --git a/hal/src/main/native/sim/HAL.cpp b/hal/src/main/native/sim/HAL.cpp index 63a9e25c25..07ded17eec 100644 --- a/hal/src/main/native/sim/HAL.cpp +++ b/hal/src/main/native/sim/HAL.cpp @@ -241,14 +241,6 @@ void HALSIM_SetRuntimeType(HAL_RuntimeType type) { runtimeType = type; } -int32_t HAL_GetFPGAVersion(int32_t* status) { - return 2018; // Automatically script this at some point -} - -int64_t HAL_GetFPGARevision(int32_t* status) { - return 0; // TODO: Find a better number to return; -} - void HAL_GetSerialNumber(struct WPI_String* serialNumber) { HALSIM_GetRoboRioSerialNumber(serialNumber); } diff --git a/hal/src/main/native/systemcore/HAL.cpp b/hal/src/main/native/systemcore/HAL.cpp index 9e8de2afd1..97ef44c9e1 100644 --- a/hal/src/main/native/systemcore/HAL.cpp +++ b/hal/src/main/native/systemcore/HAL.cpp @@ -171,18 +171,6 @@ HAL_RuntimeType HAL_GetRuntimeType(void) { return runtimeType; } -int32_t HAL_GetFPGAVersion(int32_t* status) { - hal::init::CheckInit(); - *status = HAL_HANDLE_ERROR; - return 0; -} - -int64_t HAL_GetFPGARevision(int32_t* status) { - hal::init::CheckInit(); - *status = HAL_HANDLE_ERROR; - return 0; -} - void HAL_GetSerialNumber(struct WPI_String* serialNumber) { const char* serialNum = std::getenv("serialnum"); if (!serialNum) { diff --git a/wpilibc/src/main/native/cpp/RobotController.cpp b/wpilibc/src/main/native/cpp/RobotController.cpp index a676d3248c..3844d04c1b 100644 --- a/wpilibc/src/main/native/cpp/RobotController.cpp +++ b/wpilibc/src/main/native/cpp/RobotController.cpp @@ -19,20 +19,6 @@ std::function RobotController::m_timeSource = [] { return RobotController::GetFPGATime(); }; -int RobotController::GetFPGAVersion() { - int32_t status = 0; - int version = HAL_GetFPGAVersion(&status); - FRC_CheckErrorStatus(status, "GetFPGAVersion"); - return version; -} - -int64_t RobotController::GetFPGARevision() { - int32_t status = 0; - int64_t revision = HAL_GetFPGARevision(&status); - FRC_CheckErrorStatus(status, "GetFPGARevision"); - return revision; -} - std::string RobotController::GetSerialNumber() { WPI_String serialNum; HAL_GetSerialNumber(&serialNum); diff --git a/wpilibc/src/main/native/include/frc/RobotController.h b/wpilibc/src/main/native/include/frc/RobotController.h index 6d10b51b09..3081a52806 100644 --- a/wpilibc/src/main/native/include/frc/RobotController.h +++ b/wpilibc/src/main/native/include/frc/RobotController.h @@ -26,26 +26,6 @@ class RobotController { public: RobotController() = delete; - /** - * Return the FPGA Version number. - * - * For now, expect this to be competition year. - * - * @return FPGA Version number. - */ - static int GetFPGAVersion(); - - /** - * Return the FPGA Revision number. - * - * The format of the revision is 3 numbers. The 12 most significant bits are - * the Major Revision. The next 8 bits are the Minor Revision. The 12 least - * significant bits are the Build Number. - * - * @return FPGA Revision number. - */ - static int64_t GetFPGARevision(); - /** * Return the serial number of the roboRIO. * diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java index 93aa5c5107..78905d21d7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotController.java @@ -28,26 +28,6 @@ public final class RobotController { throw new UnsupportedOperationException("This is a utility class!"); } - /** - * Return the FPGA Version number. For now, expect this to be the current year. - * - * @return FPGA Version number. - */ - public static int getFPGAVersion() { - return HALUtil.getFPGAVersion(); - } - - /** - * Return the FPGA Revision number. The format of the revision is 3 numbers. The 12 most - * significant bits are the Major Revision. the next 8 bits are the Minor Revision. The 12 least - * significant bits are the Build Number. - * - * @return FPGA Revision number. - */ - public static long getFPGARevision() { - return HALUtil.getFPGARevision(); - } - /** * Return the serial number of the roboRIO. *