mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,wpilib] Remove a ton of things related to the FPGA (#7846)
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
@@ -96,40 +96,6 @@ HAL_Bool HAL_CheckAnalogInputChannel(int32_t channel) {
|
||||
void HAL_SetAnalogInputSimDevice(HAL_AnalogInputHandle handle,
|
||||
HAL_SimDeviceHandle device) {}
|
||||
|
||||
void HAL_SetAnalogSampleRate(double samplesPerSecond, int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
double HAL_GetAnalogSampleRate(int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HAL_SetAnalogAverageBits(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t bits, int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogAverageBits(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HAL_SetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t bits, int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
auto port =
|
||||
@@ -144,16 +110,9 @@ int32_t HAL_GetAnalogValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogAverageValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogVoltsToValue(HAL_AnalogInputHandle analogPortHandle,
|
||||
double voltage, int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
return static_cast<int32_t>(voltage * 4095.0 / 3.3);
|
||||
}
|
||||
|
||||
double HAL_GetAnalogVoltage(HAL_AnalogInputHandle analogPortHandle,
|
||||
@@ -173,26 +132,7 @@ double HAL_GetAnalogVoltage(HAL_AnalogInputHandle analogPortHandle,
|
||||
|
||||
double HAL_GetAnalogValueToVolts(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t rawValue, int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
double HAL_GetAnalogAverageVoltage(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogLSBWeight(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t HAL_GetAnalogOffset(HAL_AnalogInputHandle analogPortHandle,
|
||||
int32_t* status) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
return rawValue / 4095.0 * 3.3;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user