From 9644778dbe2bf80028040bc81ed142478b63fd86 Mon Sep 17 00:00:00 2001 From: Martin Dlouhy Date: Sun, 8 Jan 2023 18:32:15 +0100 Subject: [PATCH] Fix warnings in setConfigGPIO() --- pypozyx/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pypozyx/lib.py b/pypozyx/lib.py index 4d54283..4aca08a 100755 --- a/pypozyx/lib.py +++ b/pypozyx/lib.py @@ -190,9 +190,9 @@ def setConfigGPIO(self, gpio_num, mode, pull, remote_id=None): if not 1 <= gpio_num <= 4: warn("setConfigGPIO: GPIO number {} not in range".format(gpio_num)) - if mode[0] in PozyxConstants.ALL_GPIO_MODES: + if mode[0] not in PozyxConstants.ALL_GPIO_MODES: warn("setConfigGPIO: {} wrong GPIO mode".format(mode[0])) - if pull[0] in PozyxConstants.ALL_GPIO_PULLS: + if pull[0] not in PozyxConstants.ALL_GPIO_PULLS: warn("setConfigGPIO: {} wrong GPIO pull".format(pull[0])) gpio_register = PozyxRegisters.CONFIG_GPIO_1 + gpio_num - 1