From f83cfa8d63c9251cf862970239c5315db4e2d248 Mon Sep 17 00:00:00 2001 From: SGE Date: Tue, 2 Apr 2024 10:26:40 +0200 Subject: [PATCH] formatting --- esphome/components/icnt86/icnt86.cpp | 3 ++- esphome/components/icnt86/touchscreen.py | 2 +- esphome/components/touchscreen/touchscreen.cpp | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/esphome/components/icnt86/icnt86.cpp b/esphome/components/icnt86/icnt86.cpp index 7b083a1e47..f5d835fbf2 100644 --- a/esphome/components/icnt86/icnt86.cpp +++ b/esphome/components/icnt86/icnt86.cpp @@ -53,7 +53,8 @@ void ICNT86Touchscreen::update_touches() { UWORD y = ((UWORD) buf[4 + 7 * i] << 8) + buf[3 + 7 * i]; UWORD p = buf[5 + 7 * i]; UWORD touch_evenid = buf[6 + 7 * i]; - if (this->touches_.count(touch_evenid) == 0 || (x != this->touches_[touch_evenid].x_prev && y != this->touches_[touch_evenid].y_prev)) { + if (this->touches_.count(touch_evenid) == 0 || + (x != this->touches_[touch_evenid].x_prev && y != this->touches_[touch_evenid].y_prev)) { this->add_raw_touch_position_(touch_evenid, x, y, p); } } diff --git a/esphome/components/icnt86/touchscreen.py b/esphome/components/icnt86/touchscreen.py index bb686c3ec7..43b1930d20 100644 --- a/esphome/components/icnt86/touchscreen.py +++ b/esphome/components/icnt86/touchscreen.py @@ -20,7 +20,7 @@ ICNT86Touchscreen = icnt86_ns.class_( CONF_ICNT86_ID = "icnt86_id" CONF_RTS_PIN = "rts_pin" -CONFIG_SCHEMA = touchscreen.touchscreen_schema('250ms').extend( +CONFIG_SCHEMA = touchscreen.touchscreen_schema("250ms").extend( cv.Schema( { cv.GenerateID(): cv.declare_id(ICNT86Touchscreen), diff --git a/esphome/components/touchscreen/touchscreen.cpp b/esphome/components/touchscreen/touchscreen.cpp index 0c0d1553e0..b7139d145d 100644 --- a/esphome/components/touchscreen/touchscreen.cpp +++ b/esphome/components/touchscreen/touchscreen.cpp @@ -98,8 +98,8 @@ void Touchscreen::add_raw_touch_position_(uint8_t id, int16_t x_raw, int16_t y_r tp.x = (uint16_t) ((int) x * this->display_width_ / 0x1000); tp.y = (uint16_t) ((int) y * this->display_height_ / 0x1000); } else { - tp.x = x; - tp.y = y; + tp.x = x; + tp.y = y; } } else { tp.state |= STATE_CALIBRATE;