[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:
Tyler Veness
2020-10-24 20:18:58 -07:00
committed by GitHub
parent 1e17e40868
commit 7ae8c7b247
5 changed files with 23 additions and 2 deletions

View File

@@ -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();
}