Skip to content

Commit

Permalink
Refactor Uhrtype class to include new method getMinuteVariants()
Browse files Browse the repository at this point in the history
  • Loading branch information
dbambus committed Sep 14, 2024
1 parent fa7b7f0 commit 3ca221a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/Uhrtypes/Uhrtype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ class iUhrType {

virtual const bool has24HourLayout() { return false; }

virtual std::vector<MinuteVariant> getMinuteVariants() {
return {MinuteVariant::Off, MinuteVariant::LED4x, MinuteVariant::LED7x};
}

virtual const bool hasWeatherLayout() { return false; }

virtual const bool hasSecondsFrame() { return false; }
Expand Down
9 changes: 9 additions & 0 deletions include/clockWork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,15 @@ void ClockWork::setClock() {
if (!G.languageVariant[NotShowItIs]) {
DetermineWhichItIsToShow(_hour + offsetHour);
}

auto minVariants = usedUhrType->getMinuteVariants();

Serial.print("Available minute variants: ");
for (auto variant : minVariants) {
Serial.print((uint8_t)variant);
Serial.print(" ");
}
Serial.println();
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit 3ca221a

Please sign in to comment.