Skip to content

Commit e3241ab

Browse files
authored
Merge branch 'ESPWortuhr:main' into Add-options-for-vertical,-extra-led-and-meander-layout
2 parents 7d24dae + ec3026d commit e3241ab

File tree

21 files changed

+503
-21
lines changed

21 files changed

+503
-21
lines changed

include/Transitiontypes/Transition.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class Transition {
198198
//------------------------------------------------------------------------------
199199
// Loop Helper Functions
200200
//------------------------------------------------------------------------------
201-
void demoMode(uint8_t &_minute, uint8_t _second);
201+
void demoMode(uint8_t &_hour, uint8_t &_minute, uint8_t _second);
202202
void initTransitionStart();
203203
bool hasMinuteChanged();
204204
bool isOverwrittenByTransition(WordclockChanges flag, uint8_t minute);

include/Transitiontypes/Transition.hpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,16 +1110,34 @@ uint16_t Transition::transitionSnake() {
11101110
// Loop Helper Functions
11111111
//------------------------------------------------------------------------------
11121112

1113-
void Transition::demoMode(uint8_t &_minute, uint8_t _second) {
1114-
static uint8_t test_second = 0;
1115-
static uint8_t test_minute = 45;
1113+
void Transition::demoMode(uint8_t &_hour, uint8_t &_minute, uint8_t _second) {
1114+
static uint8_t test_second = _second;
1115+
static uint8_t test_minute = _minute;
1116+
static uint8_t test_hour = _hour;
11161117
if (G.transitionDemo) {
1117-
if (isIdle() && ((_second % 10) == 0) && (test_second != _second)) {
1118-
test_minute += 5;
1118+
// increment every second
1119+
// by checking isIdle transitions are completely done
1120+
if (isIdle() && ((_second % 2) == 0) && (test_second != _second)) {
1121+
// select increment by clock type
1122+
if (usedUhrType != nullptr) {
1123+
if (usedUhrType->hasOnlyQuarterLayout()) {
1124+
test_minute += 15;
1125+
} else if (usedUhrType->has60MinuteLayout()) {
1126+
test_minute += 1;
1127+
} else {
1128+
test_minute += 5;
1129+
}
1130+
}
1131+
// add one hour every 60 minutes
11191132
if (test_minute >= 60) {
1120-
test_minute = _minute % 5;
1133+
test_minute %= 60;
1134+
test_hour = (test_hour + 1) % 24;
11211135
}
1136+
// log demo time
1137+
Serial.printf("Demo time: %02d:%02d\n", test_hour, test_minute);
11221138
}
1139+
// set to time variables
1140+
_hour = test_hour;
11231141
_minute = test_minute;
11241142
test_second = _second;
11251143
}

include/Uhr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ enum ClockType {
286286
Ger11x11 = 3,
287287
Ger11x11V2 = 8,
288288
Ger11x11V3 = 14,
289+
Ger13x13 = 31,
289290
Ger22x11Weather = 5,
290291
Ger16x8 = 13,
291292
Ger16x18 = 7,

include/Uhrtypes/DE11x11.v2.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

2323
class De11x11V2_t : public De11x11_t {
2424
public:
25+
//------------------------------------------------------------------------------
26+
27+
virtual const bool hasZwanzig() override { return false; }
28+
29+
//------------------------------------------------------------------------------
30+
2531
void show(FrontWord word) override {
2632
switch (word) {
2733

0 commit comments

Comments
 (0)