mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add ability to associate other devices with a SimDevice
Implemented only for AnalogInput, DIO, and Encoder.
This commit is contained in:
@@ -217,6 +217,10 @@ void Encoder::SetIndexSource(const DigitalSource& source,
|
||||
wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
}
|
||||
|
||||
void Encoder::SetSimDevice(HAL_SimDeviceHandle device) {
|
||||
HAL_SetEncoderSimDevice(m_encoder, device);
|
||||
}
|
||||
|
||||
int Encoder::GetFPGAIndex() const {
|
||||
int32_t status = 0;
|
||||
int val = HAL_GetEncoderFPGAIndex(m_encoder, &status);
|
||||
|
||||
Reference in New Issue
Block a user