Refactor local to localTime
(variable name in latest master)
This commit is contained in:
parent
7c4aa4441f
commit
dc7d7150cd
@ -55,7 +55,7 @@ void hourChime()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void displayTimeHSHL(byte hour, byte minute)
|
void displayTime(byte hour, byte minute)
|
||||||
{
|
{
|
||||||
bool isToHour = false; //true if minute > 30
|
bool isToHour = false; //true if minute > 30
|
||||||
strip.setSegment(0, 0, 64); // background
|
strip.setSegment(0, 0, 64); // background
|
||||||
@ -244,8 +244,8 @@ void timeOfDay() {
|
|||||||
|
|
||||||
//monday to thursday and sunday
|
//monday to thursday and sunday
|
||||||
|
|
||||||
if ((weekday(local) == 6) | (weekday(local) == 7)) {
|
if ((weekday(localTime) == 6) | (weekday(localTime) == 7)) {
|
||||||
if (hour(local) > 0 | hour(local) < 8) {
|
if (hour(localTime) > 0 | hour(localTime) < 8) {
|
||||||
strip.setBrightness(nightBrightness);
|
strip.setBrightness(nightBrightness);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -253,7 +253,7 @@ void timeOfDay() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (hour(local) < 6 | hour(local) >= 22) {
|
if (hour(localTime) < 6 | hour(localTime) >= 22) {
|
||||||
strip.setBrightness(nightBrightness);
|
strip.setBrightness(nightBrightness);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -269,12 +269,12 @@ void userLoop()
|
|||||||
{
|
{
|
||||||
updateLocalTime();
|
updateLocalTime();
|
||||||
timeOfDay();
|
timeOfDay();
|
||||||
minuteLast = minute(local);
|
minuteLast = minute(localTime);
|
||||||
displayTimeHSHL(hour(local), minute(local));
|
displayTime(hour(localTime), minute(localTime));
|
||||||
if (minute(local) == 0){
|
if (minute(localTime) == 0){
|
||||||
//hourChime();
|
//hourChime();
|
||||||
}
|
}
|
||||||
if (minute(local) == 1){
|
if (minute(localTime) == 1){
|
||||||
//userSetup();
|
//userSetup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user