diff --git a/FamilyPlanner.ino b/FamilyPlanner.ino index eb17fc3..800f786 100644 --- a/FamilyPlanner.ino +++ b/FamilyPlanner.ino @@ -56,10 +56,10 @@ const uint8_t *digits[10] = { image_data_icon_digit_0, image_data_icon_digit_1, //CHANGE HERE --------------- -char *ssid = "Freifunk"; -char *pass = ""; -char *calendarURL = "https://mail.unitas-network.de/mergedCalendars.json"; -char *timeZone = "CET-1CEST,M3.5.0/02,M10.5.0/03"; +const char *ssid = "Freifunk"; +const char *pass = ""; +const char *calendarURL = ""; +const char *timeZone = "CET-1CEST,M3.5.0/02,M10.5.0/03"; //Set to 1 to flip the screen 180 degrees #define ROTATION 3 diff --git a/Network.cpp b/Network.cpp index 3e432df..88b4490 100644 --- a/Network.cpp +++ b/Network.cpp @@ -35,11 +35,10 @@ void Network::begin() void Network::getTime(int *timeDigits) { struct tm timeinfo; + time_t nowSecs = time(nullptr); setenv("TZ", timeZone, 1); tzset(); - - time_t nowSecs = time(nullptr); localtime_r(&nowSecs, &timeinfo); // fill in the digits diff --git a/Network.h b/Network.h index b3c907f..2e4b761 100644 --- a/Network.h +++ b/Network.h @@ -4,17 +4,15 @@ #include // To get vars from main file -extern char *timeZone; +extern const char *ssid; +extern const char *pass; +extern const char *calendarURL; +extern const char *timeZone; + extern char calName[5][31]; extern char calStart[5][26]; extern char calTitle[5][81]; -// Wifi ssid and password -extern char *ssid; -extern char *pass; - -extern char *calendarURL; - #ifndef NETWORK_H #define NETWORK_H