From 0ae793a8d4fbebd09c3ce0ec4a60474776e4e1e2 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:37:31 +0200 Subject: [PATCH] Save some bytes --- tasmota/tasmota_support/support_command.ino | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 1ebcf936c..2c5828786 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1775,14 +1775,9 @@ void CmndGpioRead(void) { bool jsflg = false; Response_P(PSTR("{\"" D_CMND_GPIOREAD "\":{")); for (uint32_t i = 0; i < nitems(Settings->my_gp.io); i++) { - bool sensor_active = false; - uint32_t sensor_type = template_gp.io[i]; // Template GPIO - if ((sensor_type != GPIO_NONE) && (AGPIO(GPIO_USER) != sensor_type)) { - sensor_active = true; - } else if (Settings->my_gp.io[i] != GPIO_NONE) { // Module GPIO - sensor_active = true; - } - if (sensor_active) { + uint32_t sensor_type = template_gp.io[i]; // Template GPIO + if (((sensor_type != GPIO_NONE) && (AGPIO(GPIO_USER) != sensor_type)) || + (Settings->my_gp.io[i] != GPIO_NONE)) { // Module GPIO if (jsflg) { ResponseAppend_P(PSTR(",")); }