mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
non-cas operation
This commit is contained in:
@@ -201,10 +201,9 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
@aiotools.atomic
|
@aiotools.atomic
|
||||||
async def __inner_switch(self, state: bool) -> None:
|
async def __inner_switch(self, state: bool) -> None:
|
||||||
if state != self.__read():
|
self.__write(state)
|
||||||
self.__write(state)
|
get_logger(0).info("Ensured switch %s to state=%d", self, state)
|
||||||
get_logger(0).info("Switched %s to state=%d", self, state)
|
await asyncio.sleep(self.__busy_delay)
|
||||||
await asyncio.sleep(self.__busy_delay)
|
|
||||||
|
|
||||||
@aiotools.atomic
|
@aiotools.atomic
|
||||||
async def __inner_pulse(self, delay: float) -> None:
|
async def __inner_pulse(self, delay: float) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user