fix half transition
fix static words not displayed after transition mode change
This commit is contained in:
parent
3c22de49c7
commit
4b7553246d
@ -72,10 +72,13 @@ void Clock::refreshTime() {
|
|||||||
const uint8_t minute = loctime->tm_min;
|
const uint8_t minute = loctime->tm_min;
|
||||||
|
|
||||||
// enable night brighntess at 21' and disable it at 6'
|
// enable night brighntess at 21' and disable it at 6'
|
||||||
if (hour >= 22 || hour <= 6) {
|
bool daybrightness = !(hour >= 22 || hour <= 6);
|
||||||
strip.setBrightness(NIGHTBRIGHTNESS);
|
|
||||||
} else {
|
if (oldDayBrightness != daybrightness) {
|
||||||
strip.setBrightness(DAYBRIGHTNESS);
|
strip.setBrightness(daybrightness ? DAYBRIGHTNESS : NIGHTBRIGHTNESS);
|
||||||
|
paintAlwaysOnLeds();
|
||||||
|
|
||||||
|
oldDayBrightness = daybrightness;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTime(hour, minute, this->twentyAfterSyntax, this->clockAlwaysOn);
|
setTime(hour, minute, this->twentyAfterSyntax, this->clockAlwaysOn);
|
||||||
@ -116,7 +119,6 @@ void Clock::setTime(uint8_t hour, uint8_t minute, bool twas, bool alwaysClockWor
|
|||||||
|
|
||||||
oldhourWord = hourWord;
|
oldhourWord = hourWord;
|
||||||
}
|
}
|
||||||
// printWord(hourWord, Adafruit_NeoPixel::Color(0, 255, 255));
|
|
||||||
|
|
||||||
// print the minute words and the corresponding after/before half words
|
// print the minute words and the corresponding after/before half words
|
||||||
printMinutes(minuteselector, twas);
|
printMinutes(minuteselector, twas);
|
||||||
@ -150,8 +152,6 @@ void Clock::printMinutes(uint8_t minuteSelector, bool twas) {
|
|||||||
minuteWord = types::viertel;
|
minuteWord = types::viertel;
|
||||||
else if (minuteSelector == 9)
|
else if (minuteSelector == 9)
|
||||||
minuteWord = types::dreiviertel;
|
minuteWord = types::dreiviertel;
|
||||||
else if (minuteSelector == 6)
|
|
||||||
minuteWord = types::halb;
|
|
||||||
|
|
||||||
if (oldminuteWord != minuteWord) {
|
if (oldminuteWord != minuteWord) {
|
||||||
addque.push_back(Word(minuteWord, 0x00FF00));
|
addque.push_back(Word(minuteWord, 0x00FF00));
|
||||||
|
@ -30,7 +30,7 @@ class Clock {
|
|||||||
std::vector<Word> addque;
|
std::vector<Word> addque;
|
||||||
|
|
||||||
std::vector<uint8_t> oldminuteWord, oldvornachWord, oldhourWord;
|
std::vector<uint8_t> oldminuteWord, oldvornachWord, oldhourWord;
|
||||||
bool oldhalfActive, oldUhrActive;
|
bool oldhalfActive, oldUhrActive, oldDayBrightness;
|
||||||
|
|
||||||
bool twentyAfterSyntax;
|
bool twentyAfterSyntax;
|
||||||
bool clockAlwaysOn;
|
bool clockAlwaysOn;
|
||||||
|
Loading…
Reference in New Issue
Block a user