From f6505a7d34911b8ee08dc828bc71c4e7b78e3296 Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Tue, 7 May 2024 00:50:38 +0200 Subject: [PATCH] docs: update comments --- components/gpio_control/GPIODevices/simple_button.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/gpio_control/GPIODevices/simple_button.py b/components/gpio_control/GPIODevices/simple_button.py index 3910110d3..d48d6ae0b 100644 --- a/components/gpio_control/GPIODevices/simple_button.py +++ b/components/gpio_control/GPIODevices/simple_button.py @@ -136,13 +136,13 @@ def _handleCallbackFunction(self, *args): logger.info('{}: handleCallbackFunction, mode: {}'.format(self.name, self.hold_mode)) if self.hold_mode == "Repeat": - # Repeated call of main action (instantly and multiple times if button is held long enough) + # Repeated call of primary action (instantly and multiple times if button is held long enough) self.when_pressed(*args) while checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): self.when_pressed(*args) elif self.hold_mode == "Postpone": - # Postponed call of main action (once) + # Postponed call of primary action (once) if checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): self.when_pressed(*args) while checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): @@ -150,7 +150,7 @@ def _handleCallbackFunction(self, *args): elif self.hold_mode == "SecondFunc": # Call of secondary action (once) - # execute main action if not held past hold_time + # execute primary action if not held past hold_time if checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): self.when_held(*args) while checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): @@ -160,7 +160,7 @@ def _handleCallbackFunction(self, *args): elif self.hold_mode == "SecondFuncRepeat": # Repeated call of secondary action (multiple times if button is held long enough) - # execute main action if not held past hold_time + # execute primary action if not held past hold_time if checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW): self.when_held(*args) while checkGpioStaysInState(self.hold_time, self.pin, GPIO.LOW):