mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Rename FRC to WPILib (#8637)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -47,7 +47,7 @@ void InitializeHAL() {
|
||||
InitializeDIO();
|
||||
InitializeDutyCycle();
|
||||
InitializeEncoder();
|
||||
InitializeFRCDriverStation();
|
||||
InitializeFIRSTDriverStation();
|
||||
InitializeI2C();
|
||||
InitializeIMU();
|
||||
InitializeMain();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user