Skip to content

Commit

Permalink
clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
builderjer committed Oct 20, 2024
1 parent d2ba5d1 commit d8fe44b
Showing 1 changed file with 4 additions and 54 deletions.
58 changes: 4 additions & 54 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
from timezonefinder import TimezoneFinder

from ovos_utils import classproperty
from ovos_utils.log import LOG
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils.time import now_local, get_next_leap_year
from ovos_workshop.decorators import intent_handler
from ovos_workshop.intents import IntentBuilder
from ovos_workshop.skills import OVOSSkill
from ovos_bus_client.message import Message


def speakable_timezone(tz):
Expand Down Expand Up @@ -444,14 +446,9 @@ def show_date(self, dt: datetime.datetime, location: str):

def show_date_mark1(self, dt: datetime.datetime):
show = self.get_display_date(anchor_date=dt)
# TODO - move to mk1 plugin
LOG.debug(f"sending date to mk1 {show}")
self.bus.emit(Message("ovos.mk1.display_date",
{"text": show}))
# self.enclosure.deactivate_mouth_events()
# self.enclosure.mouth_text(show)
# time.sleep(10)
# self.enclosure.mouth_reset()
# self.enclosure.activate_mouth_events()

def show_date_gui(self, dt: datetime.datetime, location: str):
self.gui.clear()
Expand All @@ -473,56 +470,9 @@ def show_time(self, display_time: str):
self.show_time_mark1(display_time)

def show_time_mark1(self, display_time: str):
# TODO - move to mk1 plugin
LOG.debug(f"sending time to mk1 {text}")
self.bus.emit(Message("ovos.mk1.display_time",
{"text": display_time}))
# self.enclosure.deactivate_mouth_events()
# # Map characters to the display encoding for a Mark 1
# # (4x8 except colon, which is 2x8)
# code_dict = {
# ':': 'CIICAA',
# '0': 'EIMHEEMHAA',
# '1': 'EIIEMHAEAA',
# '2': 'EIEHEFMFAA',
# '3': 'EIEFEFMHAA',
# '4': 'EIMBABMHAA',
# '5': 'EIMFEFEHAA',
# '6': 'EIMHEFEHAA',
# '7': 'EIEAEAMHAA',
# '8': 'EIMHEFMHAA',
# '9': 'EIMBEBMHAA',
# }
#
# # clear screen (draw two blank sections, numbers cover rest)
# if len(display_time) == 4:
# # for 4-character times, 9x8 blank
# self.enclosure.mouth_display(img_code="JIAAAAAAAAAAAAAAAAAA",
# refresh=False)
# self.enclosure.mouth_display(img_code="JIAAAAAAAAAAAAAAAAAA",
# x=22, refresh=False)
# else:
# # for 5-character times, 7x8 blank
# self.enclosure.mouth_display(img_code="HIAAAAAAAAAAAAAA",
# refresh=False)
# self.enclosure.mouth_display(img_code="HIAAAAAAAAAAAAAA",
# x=24, refresh=False)
#
# # draw the time, centered on display
# xoffset = (32 - (4 * (len(display_time)) - 2)) / 2
# for c in display_time:
# if c in code_dict:
# self.enclosure.mouth_display(img_code=code_dict[c],
# x=xoffset, refresh=False)
# if c == ":":
# xoffset += 2 # colon is 1 pixels + a space
# else:
# xoffset += 4 # digits are 3 pixels + a space
#
# self.enclosure.mouth_display(img_code="CIAAAA", x=29,
# refresh=False)
# time.sleep(5)
# self.enclosure.mouth_reset()
# self.enclosure.activate_mouth_events()

def show_time_gui(self, display_time):
""" Display time on the GUI. """
Expand Down

0 comments on commit d8fe44b

Please sign in to comment.