Make brightness a bit look better - the second

This commit is contained in:
2023-01-01 10:27:02 +01:00
parent bb8da924df
commit d7bdae65df
+14 -14
View File
@@ -223,6 +223,20 @@ void set_word(int word, time_t current_time = loctime) {
Serial.println();
}
void set_brightness()
{
switch(int(hour(loctime)))
{
case BRIGHTNESS_HIGH_TIME:
brightness = BRIGHTNESS_HIGH;
break;
case BRIGHTNESS_LOW_TIME:
brightness = BRIGHTNESS_LOW;
break;
}
}
void setClock() {
Serial.println("Updating display...");
time_t current_time = loctime;
@@ -237,20 +251,6 @@ void setClock() {
Serial.println("... display updated.");
}
void set_brightness();
{
switch(int(hour(loctime)))
{
case BRIGHTNESS_HIGH_TIME:
brightness = BRIGHTNESS_HIGH;
break;
case BRIGHTNESS_LOW_TIME:
brightness = BRIGHTNESS_LOW;
break;
}
}
int getHour()
{
int h = int(hour(loctime));