mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[sim] Use DutyCycleEncoder FPGA index for sim device number (#2803)
The source channel doesn't necessarily correspond with the HALSIM device index.
This commit is contained in:
@@ -132,6 +132,10 @@ void DutyCycleEncoder::SetConnectedFrequencyThreshold(int frequency) {
|
||||
m_frequencyThreshold = frequency;
|
||||
}
|
||||
|
||||
int DutyCycleEncoder::GetFPGAIndex() const {
|
||||
return m_dutyCycle->GetFPGAIndex();
|
||||
}
|
||||
|
||||
int DutyCycleEncoder::GetSourceChannel() const {
|
||||
return m_dutyCycle->GetSourceChannel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user