Skip to content

Commit 7e763d5

Browse files
committed
Switch F512 to 4 way parallel output.
Fix some settings not getting saved.
1 parent d7deab7 commit 7e763d5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Fields.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,14 @@ String getClockBackgroundFade() {
9292
void setShowClock(uint8_t value)
9393
{
9494
showClock = value == 0 ? 0 : 1;
95-
96-
EEPROM.write(9, showClock);
97-
EEPROM.commit();
98-
95+
writeAndCommitSettings();
9996
broadcastInt("showClock", showClock);
10097
}
10198

10299
void setClockBackgroundFade(uint8_t value)
103100
{
104101
clockBackgroundFade = value;
105-
106-
EEPROM.write(10, clockBackgroundFade);
107-
EEPROM.commit();
108-
102+
writeAndCommitSettings();
109103
broadcastInt("clockBackgroundFade", clockBackgroundFade);
110104
}
111105

esp8266-fastled-webserver.ino

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);
6363

6464
#include "FSBrowser.h"
6565

66-
#define DATA_PIN D5
6766
#define LED_TYPE WS2812B
6867
#define COLOR_ORDER GRB
6968
#define NUM_LEDS 512
@@ -111,7 +110,7 @@ CRGBPalette16 gTargetPalette( gGradientPalettes[0] );
111110

112111
CRGBPalette16 IceColors_p = CRGBPalette16(CRGB::Black, CRGB::Blue, CRGB::Aqua, CRGB::White);
113112

114-
uint8_t currentPatternIndex = 0; // Index number of which pattern is current
113+
uint8_t currentPatternIndex = 3; // Index number of which pattern is current
115114
uint8_t autoplay = 0;
116115

117116
uint8_t autoplayDuration = 10;
@@ -290,10 +289,13 @@ void setup() {
290289
Serial.begin(115200);
291290
Serial.setDebugOutput(true);
292291

293-
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); // for WS2812 (Neopixel)
294-
//FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS); // for APA102 (Dotstar)
292+
FastLED.addLeds<LED_TYPE, D7, COLOR_ORDER>(leds, 0, 121).setCorrection(TypicalLEDStrip);
293+
FastLED.addLeds<LED_TYPE, D6, COLOR_ORDER>(leds, 121, 120).setCorrection(TypicalLEDStrip);
294+
FastLED.addLeds<LED_TYPE, D8, COLOR_ORDER>(leds, 241, 121).setCorrection(TypicalLEDStrip);
295+
FastLED.addLeds<LED_TYPE, D5, COLOR_ORDER>(leds, 362, 150).setCorrection(TypicalLEDStrip);
296+
295297
FastLED.setDither(false);
296-
// FastLED.setCorrection(TypicalSMD5050);
298+
FastLED.setCorrection(TypicalSMD5050);
297299
FastLED.setBrightness(brightness);
298300
FastLED.setMaxPowerInVoltsAndMilliamps(5, MILLI_AMPS);
299301
fill_solid(leds, NUM_LEDS, CRGB::Black);
@@ -970,6 +972,9 @@ void writeAndCommitSettings()
970972
EEPROM.write(10, twinkleDensity);
971973
EEPROM.write(11, cooling);
972974
EEPROM.write(12, sparking);
975+
EEPROM.write(13, coolLikeIncandescent);
976+
EEPROM.write(14, showClock);
977+
EEPROM.write(15, clockBackgroundFade);
973978

974979
EEPROM.write(511, 55);
975980
EEPROM.commit();

0 commit comments

Comments
 (0)