Skip to content

Commit

Permalink
Merge pull request #396 from dbambus/main
Browse files Browse the repository at this point in the history
A few fixes
  • Loading branch information
dbambus committed Apr 21, 2024
2 parents 3fdb476 + 0d394b7 commit 90c1ece
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 65 deletions.
4 changes: 4 additions & 0 deletions include/Uhr.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,8 @@ enum Icons {
SMILEY = 10,
NOTE = 11,
SNOW = 12,
MAIL = 13,
BELL = 14,
STOP = 15,
STBY = 16,
};
7 changes: 6 additions & 1 deletion include/clockWork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ void ClockWork::loop(struct tm &tm) {
}
delay(100);

if (G.mqtt.state && !mqtt.getConnected()) {
if (G.mqtt.state && !mqtt.isConnected()) {
mqtt.reInit();
}

Expand Down Expand Up @@ -1335,6 +1335,11 @@ void ClockWork::loop(struct tm &tm) {
calcClockface();

switch (changesInClockface()) {
case WordclockChanges::Minute:
lastMinuteArray = minuteArray;
memcpy(&lastFrontMatrix, &frontMatrix, sizeof lastFrontMatrix);
led.set(WordclockChanges::Minute);
break;
case WordclockChanges::Words:
lastMinuteArray = minuteArray;
memcpy(&lastFrontMatrix, &frontMatrix, sizeof lastFrontMatrix);
Expand Down
44 changes: 44 additions & 0 deletions include/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,48 @@ const uint16_t grafik_11x10[][11] PROGMEM = {
0b00110101100, // 7 87: . . 0 0 . 0 . 0 0 . . : 77
0b00110101100, // 8 88: . . 0 0 . 0 . 0 0 . . : 98
0b00000100000}, // 9 109: . . . . . 0 . . . . . : 99

{0b00000000000, // 0 MAIL 0: . . . . . . . . . . . : 10
0b11111111111, // 1 21: 0 0 0 0 0 0 0 0 0 0 0 : 11
0b11000000011, // 2 22: 0 0 . . . . . . . 0 0 : 32
0b10100000101, // 3 43: 0 . 0 . . . . . 0 . 0 : 33
0b10011111001, // 4 44: 0 . . 0 0 0 0 0 . . 0 : 54
0b10000100001, // 5 65: 0 . . . . 0 . . . . 0 : 55
0b10000000001, // 6 66: 0 . . . . . . . . . 0 : 76
0b10000000001, // 7 87: 0 . . . . . . . . . 0 : 77
0b11111111111, // 8 88: 0 0 0 0 0 0 0 0 0 0 0 : 98
0b00000000000}, // 9 109: . . . . . . . . . . . : 99

{0b00000100000, // 0 BELL 0: . . . . . 0 . . . . . : 10
0b00001110000, // 1 21: . . . . 0 0 0 . . . . : 11
0b00010001000, // 2 22: . . . 0 . . . 0 . . . : 32
0b00100000100, // 3 43: . . 0 . . . . . 0 . . : 33
0b00100000100, // 4 44: . . 0 . . . . . 0 . . : 54
0b01100000110, // 5 65: . 0 0 . . . . . 0 0 . : 55
0b01100000011, // 6 66: 0 0 . . . . . . . 0 0 : 76
0b01111111110, // 7 87: . 0 0 0 0 0 0 0 0 0 . : 77
0b00001110000, // 8 88: . . . . 0 0 0 . . . . : 98
0b00000100000}, // 9 109: . . . . . 0 . . . . . : 99

{0b00001110000, // 0 STOP 0: . . . . 0 0 0 . . . . : 10
0b00111111100, // 1 21: . . 0 0 0 0 0 0 0 . . : 11
0b01110001110, // 2 22: . 0 0 0 . . . 0 0 0 . : 32
0b11001010011, // 3 43: 0 0 . . 0 . 0 . . 0 0 : 33
0b11000100011, // 4 44: 0 0 . . . 0 . . . 0 0 : 54
0b11001010011, // 5 65: 0 0 . . 0 . 0 . . 0 0 : 55
0b11010001011, // 6 66: 0 0 . 0 . . . 0 . 0 0 : 76
0b01100000110, // 7 87: . 0 0 . . . . . 0 0 . : 77
0b00111111100, // 8 88: . . 0 0 0 0 0 0 0 . . : 98
0b00001110000}, // 9 109: . . . . 0 0 0 . . . . : 99

{0b00001110000, // 0 STBY 0: . . . . 0 0 0 . . . . : 10
0b00001110000, // 1 21: . . . . 0 0 0 . . . . : 11
0b00111111100, // 2 22: . . 0 0 0 0 0 0 0 . . : 32
0b01101110110, // 3 43: . 0 0 . 0 0 0 . 0 0 . : 33
0b11001110011, // 4 44: 0 0 . . 0 0 0 . . 0 0 : 54
0b11001110011, // 5 65: 0 0 . . 0 0 0 . . 0 0 : 55
0b11000000011, // 6 66: 0 0 . . . . . . . 0 0 : 76
0b11000000011, // 7 87: 0 0 . . . . . . . 0 0 : 77
0b01100000110, // 8 88: . 0 0 . . . . . 0 0 . : 98
0b00111111100}, // 9 109: . . 0 0 0 0 0 0 0 . . : 99
};
2 changes: 1 addition & 1 deletion include/mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class Mqtt {
void sendState();
void sendDiscovery();

bool getConnected();
bool isConnected();
};
Loading

0 comments on commit 90c1ece

Please sign in to comment.