diff options
author | Devaev Maxim <[email protected]> | 2020-09-13 21:59:09 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-13 21:59:09 +0300 |
commit | 91eb257f3df32487d00ca457f9d78eabd354ce54 (patch) | |
tree | d802e46a9f80444416f6302b76e44956f42a9e06 /kvmd | |
parent | 5ed0c27f1f7201783d60e035ba26f35f62539a08 (diff) |
non-cas operation
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/kvmd/ugpio.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kvmd/apps/kvmd/ugpio.py b/kvmd/apps/kvmd/ugpio.py index f2ff2b1b..66fa5c70 100644 --- a/kvmd/apps/kvmd/ugpio.py +++ b/kvmd/apps/kvmd/ugpio.py @@ -201,10 +201,9 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes @aiotools.atomic async def __inner_switch(self, state: bool) -> None: - if state != self.__read(): - self.__write(state) - get_logger(0).info("Switched %s to state=%d", self, state) - await asyncio.sleep(self.__busy_delay) + self.__write(state) + get_logger(0).info("Ensured switch %s to state=%d", self, state) + await asyncio.sleep(self.__busy_delay) @aiotools.atomic async def __inner_pulse(self, delay: float) -> None: |