mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Fix missing symbols on Windows (#7140)
Windows doesn't support direct static variable access across library boundaries in a mixed static/shared environment, so change to accessor functions.
This commit is contained in:
@@ -13,12 +13,6 @@
|
||||
|
||||
using namespace frc;
|
||||
|
||||
const int SensorUtil::kDigitalChannels = HAL_GetNumDigitalChannels();
|
||||
const int SensorUtil::kAnalogInputs = HAL_GetNumAnalogInputs();
|
||||
const int SensorUtil::kAnalogOutputs = HAL_GetNumAnalogOutputs();
|
||||
const int SensorUtil::kPwmChannels = HAL_GetNumPWMChannels();
|
||||
const int SensorUtil::kRelayChannels = HAL_GetNumRelayHeaders();
|
||||
|
||||
int SensorUtil::GetDefaultCTREPCMModule() {
|
||||
return 0;
|
||||
}
|
||||
@@ -46,3 +40,23 @@ bool SensorUtil::CheckAnalogInputChannel(int channel) {
|
||||
bool SensorUtil::CheckAnalogOutputChannel(int channel) {
|
||||
return HAL_CheckAnalogOutputChannel(channel);
|
||||
}
|
||||
|
||||
int SensorUtil::GetNumDigitalChannels() {
|
||||
return HAL_GetNumDigitalChannels();
|
||||
}
|
||||
|
||||
int SensorUtil::GetNumAnalogInputs() {
|
||||
return HAL_GetNumAnalogInputs();
|
||||
}
|
||||
|
||||
int SensorUtil::GetNumAnalogOuputs() {
|
||||
return HAL_GetNumAnalogOutputs();
|
||||
}
|
||||
|
||||
int SensorUtil::GetNumPwmChannels() {
|
||||
return HAL_GetNumPWMChannels();
|
||||
}
|
||||
|
||||
int SensorUtil::GetNumRelayChannels() {
|
||||
return HAL_GetNumRelayHeaders();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user