From 6b8fc2d550e73a6cafe06607949a2b04f8b1ac19 Mon Sep 17 00:00:00 2001 From: to-scho Date: Tue, 18 Jan 2022 15:42:45 +0100 Subject: [PATCH] fix for wrong stupid logic --- tasmota/xsns_22_sr04.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xsns_22_sr04.ino b/tasmota/xsns_22_sr04.ino index 93c9a9190..9bdf2e54c 100644 --- a/tasmota/xsns_22_sr04.ino +++ b/tasmota/xsns_22_sr04.ino @@ -53,7 +53,7 @@ uint8_t Sr04TModeDetect(void) if (sonar_serial->begin(9600)) { DEBUG_SENSOR_LOG(PSTR("SR4: Detect mode")); - if (! PinUsed(GPIO_SR04_TRIG)) { + if (PinUsed(GPIO_SR04_TRIG)) { sr04_type = (Sr04TMiddleValue(Sr04TMode3Distance(), Sr04TMode3Distance(), Sr04TMode3Distance()) != NO_ECHO) ? 3 : 1; } else { sr04_type = 2;