[hal] Remove FPGA functions that won't exist on SC (#8273)

This commit is contained in:
Gold856
2025-10-04 18:58:12 -04:00
committed by GitHub
parent 5c719ced5f
commit b1aaabc1c6
8 changed files with 0 additions and 149 deletions

View File

@@ -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

View File

@@ -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.
*

View File

@@ -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);
}

View File

@@ -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) {