From f6d979992f24658e63ec9a8f2aa6fa6b80cd05cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelle=20Wie=C2=BF?= <1545223+jellewie@users.noreply.github.com> Date: Fri, 21 May 2021 13:07:47 +0200 Subject: [PATCH] ClockHourAnalog now updates ClockHourAnalog and vise versa So these settings feel more right --- Arduino/Arduino.ino | 1 - Arduino/handler.ino | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Arduino/Arduino.ino b/Arduino/Arduino.ino index a8845f6..d5b6c3a 100644 --- a/Arduino/Arduino.ino +++ b/Arduino/Arduino.ino @@ -262,7 +262,6 @@ void loopLEDS() { case FLASH2: if (LastMode != Mode) StartAnimation(11, -2); break; case PACMAN: if (LastMode != Mode) StartAnimation(12, -2); break; case PHYSICS: if (LastMode != Mode) StartAnimation(13, -2); break; - default: #ifdef SerialEnabled Serial.println("mode with ID " + String(Mode) + " not found"); diff --git a/Arduino/handler.ino b/Arduino/handler.ino index a3519e5..de15b89 100644 --- a/Arduino/handler.ino +++ b/Arduino/handler.ino @@ -80,13 +80,16 @@ void handle_Set() { DoWriteToEEPROM = true; } else if (ArguName == PreFixSetClockHourAnalog) { ClockHourAnalog = IsTrue(ArgValue); + if (ClockHourAnalog == false) + ClockAnalog = false; DoWriteToEEPROM = true; } else if (ArguName == PreFixSetLEDOffset) { LEDOffset = constrain((ArgValue.toInt()), 0, TotalLEDs); DoWriteToEEPROM = true; } else if (ArguName == PreFixSetClockAnalog) { - ClockHourAnalog = true; ClockAnalog = IsTrue(ArgValue); + if (ClockAnalog) + ClockHourAnalog = true; DoWriteToEEPROM = true; } else if (ArguName == PreFixSection) { Section = ArgValue.toInt(); @@ -103,7 +106,7 @@ void handle_Set() { //if (LastMode != Mode and Section == 0) //If mode has updated, and we are talking about the whole LEDstrip, clear the current state // FastLED.clear(); - + bool ColorUpdated = false; if (Mode == WIFI) AnimationCounter = 0; if (AnimationCounter != 0) { //Animation needs to be shown