From 9584f01a70fed6a9750a76d04d2faded6715fdd9 Mon Sep 17 00:00:00 2001 From: cjkas Date: Tue, 24 Mar 2026 08:58:15 +0100 Subject: [PATCH] Fix bug with my position --- .gitignore | 1 + src/Somfy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d11457f..5609aab 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ SomfyController.ino.esp32c3.bin SomfyController.ino.esp32s2.bin .vscode/ .pio/ +.claude/ data/ build/ coredump_report.txt diff --git a/src/Somfy.cpp b/src/Somfy.cpp index 30bf84a..5feb36d 100644 --- a/src/Somfy.cpp +++ b/src/Somfy.cpp @@ -156,9 +156,9 @@ void somfy_frame_t::decodeFrame(byte* frame) { this->proto = radio_proto::RTV; this->cmd = (somfy_commands)(this->encKey - 148); } - else if(this->encKey > 133) { + else if(this->encKey >= 133) { this->proto = radio_proto::RTW; - this->cmd = (somfy_commands)(this->encKey - 133); + this->cmd = this->encKey == 133 ? somfy_commands::My : (somfy_commands)(this->encKey - 133); } } else this->proto = radio_proto::RTS;