Closed
Description
Describe the bug
test_pwm_output_device_alt_values
fails with the latest version of micropython v1.20.0-38-g1b980c9db
Previously micropython PWM.duty_u16 device would return 1 less than the duty factor when "on", if the duty factor was less than the maximum of 65535./
See this comment https://github.com/RaspberryPiFoundation/picozero/blob/master/tests/test_picozero.py#L182
This is no longer the case.
To Reproduce
Steps to reproduce the behaviour:
- Update the pico with the latest firmware - https://micropython.org/download/rp2-pico/rp2-pico-latest.uf2
- Run tests/test_picozero.py
test_pwm_output_device_alt_values (Testpicozero) ... FAIL
Traceback (most recent call last):
File "<stdin>", line 598, in <module>
File "/lib/unittest.py", line 222, in main
File "/lib/unittest.py", line 160, in run
File "/lib/unittest.py", line 195, in run_class
File "<stdin>", line 183, in test_pwm_output_device_alt_values
File "/lib/unittest.py", line 32, in assertEqual
AssertionError: 10000 vs (expected) 9999