Make brightness a bit look better - the second
This commit is contained in:
+14
-14
@@ -223,6 +223,20 @@ void set_word(int word, time_t current_time = loctime) {
|
|||||||
Serial.println();
|
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() {
|
void setClock() {
|
||||||
Serial.println("Updating display...");
|
Serial.println("Updating display...");
|
||||||
time_t current_time = loctime;
|
time_t current_time = loctime;
|
||||||
@@ -237,20 +251,6 @@ void setClock() {
|
|||||||
Serial.println("... display updated.");
|
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 getHour()
|
||||||
{
|
{
|
||||||
int h = int(hour(loctime));
|
int h = int(hour(loctime));
|
||||||
|
|||||||
Reference in New Issue
Block a user