Skip to content

Commit 32f1207

Browse files
authored
Fix: adjust to now semantically correct usage of "getPwmPeriod" and "getPwmPulse". (#25)
This requires >= Arduino_Opta_Blueprint v0.2.4.
1 parent 4d1783c commit 32f1207

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/opta_opcua_server/opta_opcua_server.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,11 @@ void setup()
371371
},
372372
[i, p](void) -> uint32_t
373373
{
374-
return reinterpret_cast<AnalogExpansion *>(OptaController.getExpansionPtr(i))->getPwmPeriod(p - OA_PWM_CH_FIRST);
374+
return reinterpret_cast<AnalogExpansion *>(OptaController.getExpansionPtr(i))->getPwmPeriod(p);
375375
},
376376
[i, p](void) -> uint32_t
377377
{
378-
return reinterpret_cast<AnalogExpansion *>(OptaController.getExpansionPtr(i))->getPwmPulse(p - OA_PWM_CH_FIRST);
378+
return reinterpret_cast<AnalogExpansion *>(OptaController.getExpansionPtr(i))->getPwmPulse(p);
379379
});
380380
pwm_output_num++;
381381
}

0 commit comments

Comments
 (0)