mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Add frequency support to DutyCycle (#8076)
This commit is contained in:
@@ -187,7 +187,7 @@ void DIOsSimModel::Update() {
|
||||
auto& model = m_dutyCycleModels[i];
|
||||
if (HALSIM_GetDutyCycleInitialized(i)) {
|
||||
if (!model) {
|
||||
int channel = HALSIM_GetDutyCycleDigitalChannel(i);
|
||||
int channel = i;
|
||||
if (channel >= 0 && channel < numDIO && m_dioModels[channel]) {
|
||||
model = std::make_unique<DutyCycleSimModel>(i);
|
||||
m_dioModels[channel]->SetDutyCycle(model.get());
|
||||
|
||||
Reference in New Issue
Block a user