Rename FRC to WPILib (#8637)

This commit is contained in:
Thad House
2026-03-13 23:05:55 -07:00
committed by GitHub
parent 6830c65a15
commit b2b111dc11
73 changed files with 134 additions and 141 deletions

View File

@@ -6,7 +6,7 @@
#include <jni.h>
#ifdef __FRC_SYSTEMCORE__
#ifdef __FIRST_SYSTEMCORE__
#include <signal.h>
#endif
@@ -95,7 +95,7 @@ JNIEXPORT void JNICALL
Java_org_wpilib_hardware_hal_HAL_terminate
(JNIEnv*, jclass)
{
#ifdef __FRC_SYSTEMCORE__
#ifdef __FIRST_SYSTEMCORE__
::raise(SIGKILL);
#endif
}

View File

@@ -40,11 +40,6 @@
#define HAL_WARN_CANSessionMux_SocketBufferFull_MESSAGE \
"CAN: Socket Buffer full. Generally caused by sending too many packets."
#define ERR_FRCSystem_NetCommNotResponding_MESSAGE \
"FRCSystem: NetComm not responding"
#define ERR_FRCSystem_NoDSConnection_MESSAGE \
"FRCSystem: No driver station connected"
#define HAL_SUCCESS 0
#define SAMPLE_RATE_TOO_HIGH 1001

View File

@@ -137,7 +137,7 @@ inline int16_t getHandleTypedIndex(HAL_Handle handle, HAL_HandleEnum enumType,
if (!isHandleType(handle, enumType)) {
return InvalidHandleIndex;
}
#if !defined(__FRC_SYSTEMCORE__)
#if !defined(__FIRST_SYSTEMCORE__)
if (!isHandleCorrectVersion(handle, version)) {
return InvalidHandleIndex;
}

View File

@@ -54,8 +54,8 @@ static_assert(std::is_standard_layout_v<JoystickDataCache>);
static std::atomic_bool gShutdown{false};
struct FRCDriverStation {
~FRCDriverStation() { gShutdown = true; }
struct FIRSTDriverStation {
~FIRSTDriverStation() { gShutdown = true; }
wpi::util::EventVector newDataEvents;
wpi::util::mutex cacheMutex;
wpi::util::mutex tcpCacheMutex;
@@ -114,11 +114,11 @@ void TcpCache::Update() {
}
}
static ::FRCDriverStation* driverStation;
static ::FIRSTDriverStation* driverStation;
namespace wpi::hal::init {
void InitializeDriverStation() {
static FRCDriverStation ds;
static FIRSTDriverStation ds;
driverStation = &ds;
}
} // namespace wpi::hal::init

View File

@@ -200,13 +200,13 @@ struct SystemServerDriverStation {
~SystemServerDriverStation() { ntInst.RemoveListener(controlDataListener); }
};
struct FRCDriverStation {
struct FIRSTDriverStation {
wpi::util::EventVector newDataEvents;
};
} // namespace
static ::SystemServerDriverStation* systemServerDs;
static ::FRCDriverStation* driverStation;
static ::FIRSTDriverStation* driverStation;
void SystemServerDriverStation::HandleListener(const wpi::nt::Event& event) {
auto valueEvent = event.GetValueEventData();
@@ -378,10 +378,10 @@ void TcpCache::Update() {
}
namespace wpi::hal::init {
void InitializeFRCDriverStation() {
void InitializeFIRSTDriverStation() {
InitializeDashboardOpMode();
newestControlWord.value = 0;
static FRCDriverStation ds;
static FIRSTDriverStation ds;
driverStation = &ds;
}
} // namespace wpi::hal::init

View File

@@ -47,7 +47,7 @@ void InitializeHAL() {
InitializeDIO();
InitializeDutyCycle();
InitializeEncoder();
InitializeFRCDriverStation();
InitializeFIRSTDriverStation();
InitializeI2C();
InitializeIMU();
InitializeMain();

View File

@@ -29,7 +29,7 @@ extern void InitializeDigitalInternal();
extern void InitializeDIO();
extern void InitializeDutyCycle();
extern void InitializeEncoder();
extern void InitializeFRCDriverStation();
extern void InitializeFIRSTDriverStation();
extern void InitializeHAL();
extern void InitializeI2C();
extern void InitializeIMU();