Closed SebVoss closed 6 years ago
Hi SebVoss,
cool! Vielen Dank für den Input! Here we go: https://github.com/bk1285/rpi_wordclock/commit/6b0a202bb4356f7912d3f82921336c36096b57cf
VG, Bernd
2017-08-28 0:25 GMT+02:00 SebVoss notifications@github.com:
Hallo Bernd,
für den Fall, dass jemand folgende Matrix als Layout verwendet
["ESKISTAFÜNF", "ZEHNZWANZIG", "DREIVIERTEL", "VORFUNKNACH", "HALBAELFÜNF", "EINSXAMZWEI", "DREIPMJVIER", "SECHSNLACHT", "SIEBENZWÖLF", "ZEHNEUNKUHR"]
Könntest du folgenden Code einbauen in
wordclock_plugins/time_default/time_germanalternative.py:
`import datetime as dt
class time_germanalternative(): ''' This class returns a given time as a range of LED-indices. Illuminating these LEDs represents the current time on a german WCA in alternative layout '''
def init(self): self.prefix = range(0,2) + range(3,6) self.minutes=[[], \ range(7,11) + range(40,44), \ range(11,15) + range(40,44), \ range(26,33) + range(40,44), \ range(15,22) + range(40,44), \ range(7,11) + range(33,36) + range(44,48), \ range(44,48), \ range(7,11) + range(40,44) + range(44,48), \ range(15,22) + range(33,36), \ range(26,33) + range(33,36), \ range(11,15) + range(33,36), \ range(7,11) + range(33,36) ] self.hours= [range(94,99), \ range(55,59), \ range(62,66), \ range(66,70), \ range(73,77), \ range(51,55), \ range(77,82), \ range(88,94), \ range(84,88), \ range(102,106), \ range(99,103), \ range(49,52), \ range(94,99)] self.full_hour= range(107,110)
def get_time(self, time, withPrefix=True): hour=time.hour%12+(1 if time.minute/5 > 4 else 0) minute=time.minute/5
Assemble indices
return \ (self.prefix if withPrefix else []) + \ self.minutes[minute] + \ self.hours[hour] + \ ([60] if (hour == 1 and minute != 0) else []) + \ (self.full_hour if (minute == 0) else [])`
Zusätzlich in wordclock_plugins/time_default/plugin.py
import time_germanalternative
und im config-file germanalternative statt german eintragen.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bk1285/rpi_wordclock/issues/67, or mute the thread https://github.com/notifications/unsubscribe-auth/AJMV9nzloRQ1mhT5tNeCCGkxX8-CV5rvks5scezvgaJpZM4PD8IT .
Hallo Bernd,
// SORRY, hat doch noch Bugs.