From 2d44539484c56c6300a582ea026728442d9bc618 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 9 Sep 2020 15:24:15 +0300 Subject: prefer sync api --- kvmd/apps/kvmd/ugpio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kvmd/apps') diff --git a/kvmd/apps/kvmd/ugpio.py b/kvmd/apps/kvmd/ugpio.py index cc394c95..e2cd2116 100644 --- a/kvmd/apps/kvmd/ugpio.py +++ b/kvmd/apps/kvmd/ugpio.py @@ -135,7 +135,7 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes return { "switch": self.__switch, "pulse": { - "delay": self.__pulse_delay, + "delay": min(max(self.__pulse_delay, self.__min_pulse_delay), self.__max_pulse_delay), "min_delay": (self.__min_pulse_delay if self.__pulse_delay else 0), "max_delay": (self.__max_pulse_delay if self.__pulse_delay else 0), }, -- cgit v1.2.3