Fixed wrong EEPROM address for currentPaletteIndex

This commit is contained in:
Jason Coon 2017-02-21 18:53:15 -06:00
parent e0a0095d04
commit 30a8d23139

View File

@ -786,7 +786,7 @@ void loadSettings()
autoplay = EEPROM.read(6); autoplay = EEPROM.read(6);
autoplayDuration = EEPROM.read(7); autoplayDuration = EEPROM.read(7);
currentPaletteIndex = EEPROM.read(1); currentPaletteIndex = EEPROM.read(8);
if (currentPaletteIndex < 0) if (currentPaletteIndex < 0)
currentPaletteIndex = 0; currentPaletteIndex = 0;
else if (currentPaletteIndex >= paletteCount) else if (currentPaletteIndex >= paletteCount)
@ -898,7 +898,7 @@ void setPalette(uint8_t value)
currentPaletteIndex = value; currentPaletteIndex = value;
EEPROM.write(1, currentPaletteIndex); EEPROM.write(8, currentPaletteIndex);
EEPROM.commit(); EEPROM.commit();
broadcastInt("palette", currentPaletteIndex); broadcastInt("palette", currentPaletteIndex);