ikalogic / ScanaStudio-scripts-v3

8 stars 13 forks source link

[SP1018] With the PWM decoder, when nb_of_cycles is 0, PWM only outputs one period #25

Closed YoannD42 closed 10 months ago

YoannD42 commented 10 months ago

https://github.com/ikalogic/ScanaStudio-scripts-v3/blob/09d1605e66a315b9efe76dfcbc414fd189bbe654/pwm.js#L418

When nb_of_cycles variable is set to 0, the PWM only outputs one period, while the prompts suggest an infinite loop. It looks like the while condition exits.

If this variable is set >= 1, the good amount of periods is outputted.

Configuration used :

image

Output :

image

YoannD42 commented 10 months ago

Resolved with https://github.com/ikalogic/ScanaStudio-scripts-v3/commit/254c22f147117822887b1cd482095684c8c1c7e2