Skip to content

Commit

Permalink
ClockHourAnalog now updates ClockHourAnalog and vise versa
Browse files Browse the repository at this point in the history
So these settings feel more right
  • Loading branch information
jellewie committed May 21, 2021
1 parent 520f4e8 commit f6d9799
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion Arduino/Arduino.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
7 changes: 5 additions & 2 deletions Arduino/handler.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down

0 comments on commit f6d9799

Please sign in to comment.