waveform80 / rpi-lgpio

A compatibility shim for lgpio emulating the RPi.GPIO API
https://rpi-lgpio.readthedocs.io/
Other
9 stars 5 forks source link

Typo in setup() function argument #18

Closed tmandys closed 1 month ago

tmandys commented 1 month ago
def setup(chanlist, direction, pull_up_down=PUD_OFF, initial=None):
....
-       if _warnings and gpio in (2, 3) and pull in (PUD_UP, PUD_DOWN):
+       if _warnings and gpio in (2, 3) and pull_up_down in (PUD_UP, PUD_DOWN):
LPS13 commented 1 month ago

I found this error as well. Trying to get the SafeShutdown.py script for my RetroFlag NESPi 4 case to function again after an OS upgrade.

waveform80 commented 1 month ago

Closing as a duplicate of #16, which is in fact already fixed (originally reported in #8) but which apparently still exists in some distro's packaged releases. Could I ask which distro and which version of that distro you're using? E.g. RaspiOS bullseye or something like that?