Adjustments for my setup

This commit is contained in:
Stefan H. 2024-02-29 21:42:20 +01:00
parent fe5a07b429
commit 9507532fa1

View file

@ -40,7 +40,7 @@
#define AUTODST #define AUTODST
// FADING - uncomment to enable fading effects for dots/digits, other parameters further down below // FADING - uncomment to enable fading effects for dots/digits, other parameters further down below
// #define FADING #define FADING
// autoBrightness - uncomment to enable automatic brightness adjustments by using a photoresistor/LDR // autoBrightness - uncomment to enable automatic brightness adjustments by using a photoresistor/LDR
// #define AUTOBRIGHTNESS // #define AUTOBRIGHTNESS
@ -101,8 +101,8 @@ RtcDS3231<TwoWire> Rtc(Wire);
/* Start WiFi config/parameters------------------------------------------------------------------------- */ /* Start WiFi config/parameters------------------------------------------------------------------------- */
#ifdef USEWIFI #ifdef USEWIFI
const bool useWPS = false; // set to false to disable WPS and use credentials below const bool useWPS = false; // set to false to disable WPS and use credentials below
const char *wifiSSID = "maWhyFhy"; const char *wifiSSID = "unhb.de";
const char *wifiPWD = "5up3r1337r0xX0r!"; const char *wifiPWD = "sagichnicht";
#endif #endif
/* End WiFi config/parameters--------------------------------------------------------------------------- */ /* End WiFi config/parameters--------------------------------------------------------------------------- */
@ -128,12 +128,12 @@ const char *wifiPWD = "5up3r1337r0xX0r!";
TimeChangeRule *tcr; TimeChangeRule *tcr;
//----------------------------------------------- //-----------------------------------------------
/* US */ /* US */
TimeChangeRule tcr1 = {"tcr1", First, Sun, Nov, 2, -300}; // utc -5h, valid from first sunday of november at 2am //TimeChangeRule tcr1 = {"tcr1", First, Sun, Nov, 2, -300}; // utc -5h, valid from first sunday of november at 2am
TimeChangeRule tcr2 = {"tcr2", Second, Sun, Mar, 2, -240}; // utc -4h, valid from second sunday of march at 2am //TimeChangeRule tcr2 = {"tcr2", Second, Sun, Mar, 2, -240}; // utc -4h, valid from second sunday of march at 2am
//----------------------------------------------- //-----------------------------------------------
/* Europe */ /* Europe */
// TimeChangeRule tcr1 = {"tcr1", Last, Sun, Oct, 3, 60}; // standard/winter time, valid from last sunday of october at 3am, UTC + 1 hour (+60 minutes) (negative value like -300 for utc -5h) TimeChangeRule tcr1 = {"tcr1", Last, Sun, Oct, 3, 60}; // standard/winter time, valid from last sunday of october at 3am, UTC + 1 hour (+60 minutes) (negative value like -300 for utc -5h)
// TimeChangeRule tcr2 = {"tcr2", Last, Sun, Mar, 2, 120}; // daylight/summer time, valid from last sunday of march at 2am, UTC + 2 hours (+120 minutes) TimeChangeRule tcr2 = {"tcr2", Last, Sun, Mar, 2, 120}; // daylight/summer time, valid from last sunday of march at 2am, UTC + 2 hours (+120 minutes)
//----------------------------------------------- //-----------------------------------------------
Timezone myTimeZone(tcr1, tcr2); Timezone myTimeZone(tcr1, tcr2);
#endif #endif
@ -182,7 +182,7 @@ int ORIENTATION = 0;
/* Start basic appearance config------------------------------------------------------------------------ */ /* Start basic appearance config------------------------------------------------------------------------ */
const bool dotsBlinking = false; // true = only light up dots on even seconds, false = always on const bool dotsBlinking = false; // true = only light up dots on even seconds, false = always on
const bool leadingZero = false; // true = enable a leading zero, 9:00 -> 09:00, 1:30 -> 01:30... const bool leadingZero = false; // true = enable a leading zero, 9:00 -> 09:00, 1:30 -> 01:30...
uint8_t displayMode = 1; // 0 = 24h mode, 1 = 12h mode ("1" will also override setting that might be written to EEPROM!) uint8_t displayMode = 0; // 0 = 24h mode, 1 = 12h mode ("1" will also override setting that might be written to EEPROM!)
uint8_t colorMode = 0; // different color modes, setting this to anything else than zero will overwrite values written to eeprom, as above uint8_t colorMode = 0; // different color modes, setting this to anything else than zero will overwrite values written to eeprom, as above
uint16_t colorSpeed = 750; // controls how fast colors change, smaller = faster (interval in ms at which color moves inside colorizeOutput();) uint16_t colorSpeed = 750; // controls how fast colors change, smaller = faster (interval in ms at which color moves inside colorizeOutput();)
const bool colorPreview = true; // true = preview selected palette/colorMode using "8" on all positions for 3 seconds const bool colorPreview = true; // true = preview selected palette/colorMode using "8" on all positions for 3 seconds
@ -192,8 +192,8 @@ const uint8_t brightnessLevels[3]{80, 130, 220}; // 0 - 255, brightness Levels (
uint8_t brightness = brightnessLevels[0]; // default brightness if none saved to eeprom yet / first run uint8_t brightness = brightnessLevels[0]; // default brightness if none saved to eeprom yet / first run
#ifdef FADING #ifdef FADING
uint8_t fadeDigits = 2; // fade digit segments, 0 = disabled, 1 = only fade out segments turned off, 2 = fade old out and fade new in uint8_t fadeDigits = 2; // fade digit segments, 0 = disabled, 1 = only fade out segments turned off, 2 = fade old out and fade new in
uint8_t fadeDots = 2; // fade dots, 0 = disabled, 1 = turn dots off without fading in/out after specidfied time, 2 = fade in and out uint8_t fadeDots = 0; // fade dots, 0 = disabled, 1 = turn dots off without fading in/out after specidfied time, 2 = fade in and out
uint8_t fadeDelay = 15; // milliseconds between each fading step, 5-25 should work okay-ish uint8_t fadeDelay = 25; // milliseconds between each fading step, 5-25 should work okay-ish
#endif #endif
/* End basic appearance config-------------------------------------------------------------------------- */ /* End basic appearance config-------------------------------------------------------------------------- */
@ -328,37 +328,37 @@ const uint16_t segGroups[42][2] PROGMEM = {
/* segments 0-27, 4 digits x 7 segments */ /* segments 0-27, 4 digits x 7 segments */
/* digit position 0 */ /* digit position 0 */
{48, 40}, // top, a {1, 2}, // top, a
{32, 33}, // top right, b {3, 11}, // top right, b
{34, 35}, // bottom right, c {19, 27}, // bottom right, c
{43, 51}, // bottom, d {25, 26}, // bottom, d
{59, 58}, // bottom left, e {24, 16}, // bottom left, e
{57, 56}, // top left, f {0, 8}, // top left, f
{49, 41}, // center, g {9, 10}, // center, g
/* digit position 1 */ /* digit position 1 */
{16, 8}, // top, a {5, 6}, // top, a
{0, 1}, // top right, b {7, 15}, // top right, b
{2, 3}, // bottom right, c {23, 31}, // bottom right, c
{11, 19}, // bottom, d {29, 30}, // bottom, d
{27, 26}, // bottom left, e {28, 20}, // bottom left, e
{25, 24}, // top left, f {04, 12}, // top left, f
{17, 9}, // center, g {13, 14}, // center, g
/* digit position 2 */ /* digit position 2 */
{52, 44}, // top, a {33, 34}, // top, a
{36, 37}, // top right, b {35, 43}, // top right, b
{38, 39}, // bottom right, c {51, 59}, // bottom right, c
{47, 55}, // bottom, d {57, 58}, // bottom, d
{63, 62}, // bottom left, e {56, 48}, // bottom left, e
{61, 60}, // top left, f {32, 40}, // top left, f
{53, 45}, // center, g {41, 42}, // center, g
/* digit position 3 */ /* digit position 3 */
{20, 12}, // top, a {37, 38}, // top, a
{4, 5}, // top right, b {39, 47}, // top right, b
{6, 7}, // bottom right, c {55, 63}, // bottom right, c
{23, 15}, // bottom, d {61, 62}, // bottom, d
{31, 30}, // bottom left, e {60, 52}, // bottom left, e
{28, 29}, // top left, f {36, 44}, // top left, f
{21, 13}, // center, g {45, 46}, // center, g
#if (LED_DIGITS == 6) // add two digits, 14 segments, only used if LED_DIGITS is 6... #if (LED_DIGITS == 6) // add two digits, 14 segments, only used if LED_DIGITS is 6...
/* segments 28-41, 6 digits x 7 segments */ /* segments 28-41, 6 digits x 7 segments */
/* (bogus on some models which don't support 6 digits) */ /* (bogus on some models which don't support 6 digits) */
@ -383,8 +383,8 @@ const uint16_t segGroups[42][2] PROGMEM = {
}; };
#if (LED_DIGITS == 4) #if (LED_DIGITS == 4)
const uint16_t upperDots[2] PROGMEM = {50}; // leds inside the upper dots (right on L7-QBE) const uint16_t upperDots[2] PROGMEM = {18}; // leds inside the upper dots (right on L7-QBE)
const uint16_t lowerDots[2] PROGMEM = {42}; // leds inside the lower dots (left on L7-QBE) const uint16_t lowerDots[2] PROGMEM = {19}; // leds inside the lower dots (left on L7-QBE)
#endif #endif
#if (LED_DIGITS == 6) #if (LED_DIGITS == 6)
@ -392,8 +392,8 @@ const uint16_t upperDots[4] PROGMEM = {49, 50, 103, 104}; // all the leds inside
const uint16_t lowerDots[4] PROGMEM = {52, 53, 106, 107}; // all the leds inside the lower dots (bogus values on some models which don't support 6 digits) const uint16_t lowerDots[4] PROGMEM = {52, 53, 106, 107}; // all the leds inside the lower dots (bogus values on some models which don't support 6 digits)
#endif #endif
const uint16_t amLight[1] PROGMEM = {54}; const uint16_t amLight[1] PROGMEM = {21};
const uint16_t pmLight[1] PROGMEM = {14}; const uint16_t pmLight[1] PROGMEM = {22};
// Using above arrays it's very easy to "talk" to the segments. Simply use 0-6 for the first 7 segments, add 7 (7-13) for the second one, 14-20 for third.... // Using above arrays it's very easy to "talk" to the segments. Simply use 0-6 for the first 7 segments, add 7 (7-13) for the second one, 14-20 for third....
const uint8_t digits[21][7] PROGMEM = { const uint8_t digits[21][7] PROGMEM = {