From 9b7b08e9cb571a719a6bbf1e571ad93c68ec3cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Wed, 3 Sep 2025 22:59:14 +0200 Subject: [PATCH] GosundSP111 relay0LED FIX --- src/io.cpp | 2 +- src/io.h | 7 +++++++ src/main.cpp | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/io.cpp b/src/io.cpp index 25254d2..26c3e2c 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -12,7 +12,7 @@ Button button0(13, true, true, [](const ButtonEvent event) { buttonCallback(rela Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true); #ifdef GosundSP111 -Output relay0Led("relay0Led", 3, true, false); +Output relay0Led("relay0Led", 2, true, false); #endif #endif diff --git a/src/io.h b/src/io.h index f2fcdf9..9f42ba2 100644 --- a/src/io.h +++ b/src/io.h @@ -36,6 +36,9 @@ inline void ioSetup() { status.setup(); button0.setup(); relay0.setup(); +#ifdef GosundSP111 + relay0Led.setup(); +#endif #ifdef Sonoff4ChPro button1.setup(); button2.setup(); @@ -50,6 +53,10 @@ inline void ioLoop() { status.loop(); button0.loop(); relay0.loop(); +#ifdef GosundSP111 + relay0Led.set(relay0.get()); + relay0Led.loop(); +#endif #ifdef Sonoff4ChPro button1.loop(); button2.loop(); diff --git a/src/main.cpp b/src/main.cpp index 53e0169..47a0c73 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,4 @@ void loop() { wifiLoop(); ioLoop(); ArduinoOTA.handle(); -#ifdef GosundSP111 - relay0Led.set(relay0.get()); -#endif }