Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in setConfigGPIO() #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m3d
Copy link

@m3d m3d commented Jan 8, 2023

There was wrong (opposite) condition for given warnings:

>>> mode.value = pypozyx.PozyxConstants.GPIO_DIGITAL_INPUT
>>> pull.value = pypozyx.PozyxConstants.GPIO_PULL_UP
>>> pozyx.setConfigGPIO(1, mode, pull, 0xD53)
/home/md/.virtualenvs/osgar/lib/python3.8/site-packages/pypozyx/lib.py:194: UserWarning: setConfigGPIO: 0 wrong GPIO mode
  warn("setConfigGPIO: {} wrong GPIO mode".format(mode[0]))
/home/md/.virtualenvs/osgar/lib/python3.8/site-packages/pypozyx/lib.py:196: UserWarning: setConfigGPIO: 1 wrong GPIO pull
  warn("setConfigGPIO: {} wrong GPIO pull".format(pull[0]))
1

but this functions seems to be working fine ...

Complete code and comments at robotika.cz/articles/pozyx/cs#230108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant