diff --git a/src/SevenSegmentClock.h b/src/SevenSegmentClock.h
index 2a505c0..fd29dd1 100644
--- a/src/SevenSegmentClock.h
+++ b/src/SevenSegmentClock.h
@@ -28,7 +28,7 @@ public:
void setBrightness(uint8_t b) { brightness=b; initColors(b); };
uint8_t getBrightness(void) { return brightness; };
private:
- void init(void) { displayStatus = Off; clockHour=12; clockMinute=34; setClockHalted(true); currentColorHandle = Blue; currentColor = blue; };
+ void init(void) { displayStatus = Off; clockHour=12; clockMinute=34; setClockHalted(true); currentColorHandle = Green; currentColor = green; };
static uint8_t LedDataPin;
static Adafruit_NeoPixel *strip;
static BlinkMode blinkMode;
diff --git a/src/main.cpp b/src/main.cpp
index a92c767..b699ad1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,7 +18,7 @@ WiFiUDP ntpUDP;
// You can specify the time server pool and the offset (in seconds, can be
// changed later with setTimeOffset() ). Additionaly you can specify the
// update interval (in milliseconds, can be changed using setUpdateInterval() ).
-NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000);
+NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 7200, 60000);
#define MODE_DEMO 1
#define MODE_REALCLOCK 2
@@ -35,7 +35,7 @@ static const char *appName = "FastclockClient7Seg";
#define DEFAULT_CLOCK_NAME "fastclk"
#define DEFAULT_CLOCK_CHANNEL_STRING "1"
#define DEFAULT_CLOCK_CHANNEL 1
-#define DEFAULT_CLOCK_COLOR "blue"
+#define DEFAULT_CLOCK_COLOR "green"
SevenSegmentClock sevenSegmentClock;
ESP8266WebServer *server;
@@ -81,7 +81,7 @@ static const SevenSegmentClock::Color getColorHandle(uint8_t id) {
return colorSelection[i].colorHandle;
}
}
- return SevenSegmentClock::Blue; // default
+ return SevenSegmentClock::Green; // default
}
static const SevenSegmentClock::Color getColorHandleByName(String name) {
@@ -90,10 +90,10 @@ static const SevenSegmentClock::Color getColorHandleByName(String name) {
return colorSelection[i].colorHandle;
}
}
- return SevenSegmentClock::Blue; // default
+ return SevenSegmentClock::Green; // default
}
-#define DEFAULT_COLOR SevenSegmentClock::Blue
+#define DEFAULT_COLOR SevenSegmentClock::Green
#define DEFAULT_BRIGHTNESS 31
char clockName[MAX_CLOCK_NAME_LEN+1] = DEFAULT_CLOCK_NAME;
@@ -101,7 +101,7 @@ char clockChannelString[MAX_CLOCK_CHANNEL_STRING_LEN+1] = DEFAULT_CLOCK_CHANNEL_
uint8_t clockChannel = DEFAULT_CLOCK_CHANNEL;
SevenSegmentClock::Color clockColor = DEFAULT_COLOR;
//uint8_t brightness = DEFAULT_BRIGHTNESS;
-
+int utcTimeOffsetMinutes = 120; // default UTC+2h
//flag for saving data
bool shouldSaveConfig = false;
@@ -196,6 +196,7 @@ const char _FORM_CLOCKMODE_HEADLINE[] PROGMEM = "
Clock mode:
";
const char _FORM_CLOCKMODE_DEMO[] PROGMEM = "
";
const char _FORM_CLOCKMODE_REAL[] PROGMEM = "
";
const char _FORM_CLOCKMODE_FAST[] PROGMEM = "
";
+const char _FORM_UTC_OFFSET[] PROGMEM = "
";
const char _FORM_PARAM[] PROGMEM = "
";
const char _FORM_COLOR_HEADLINE[] PROGMEM = "
Display color:
";
const char _FORM_COLOR_BLUE[] PROGMEM = "
";
@@ -235,6 +236,7 @@ void appConfig() {
input = FPSTR(_FORM_CLOCKMODE_FAST);
input.replace("{check}", (appMode == MODE_FASTCLOCK) ? "checked" : "");
page += input;
+ page += FPSTR(_FORM_UTC_OFFSET);
page += FPSTR(_FORM_CLOCKNAME);
page += FPSTR(_FORM_COLOR_HEADLINE);
input = FPSTR(_FORM_COLOR_BLUE);
@@ -267,6 +269,14 @@ void appConfig() {
void appConfigSave() {
String page = FPSTR(_HEAD);
+ page.replace("{v}", "7Seg Config");
+ page += FPSTR(_SCRIPT);
+ page += FPSTR(_STYLE);
+ page += FPSTR(_HEAD_END);
+ page += String(F("