fixed the messages
This commit is contained in:
parent
e25d228ae4
commit
a926a22a5e
@ -33,13 +33,13 @@ class ModuleWrapper():
|
|||||||
command, params = self.bot.telegram.handle_result(result)
|
command, params = self.bot.telegram.handle_result(result)
|
||||||
if command != "nothing":
|
if command != "nothing":
|
||||||
if command in self.hw_commands:
|
if command in self.hw_commands:
|
||||||
self.react_command(command,params) #hw-level
|
self.react_hw_command(command,params) # hw-level
|
||||||
else:
|
else:
|
||||||
self.bot.react_command(command,params) #sw-level
|
self.bot.react_command(command,params) # sw-level
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
||||||
def react_command(self, command, params):
|
def react_hw_command(self, command, params):
|
||||||
""""""
|
""""""
|
||||||
# Oh yeah, that needs to be changed
|
# Oh yeah, that needs to be changed
|
||||||
# so params is a list, and so, to pass the commands, we need to unpack it:
|
# so params is a list, and so, to pass the commands, we need to unpack it:
|
||||||
|
@ -77,7 +77,7 @@ class ClockFace(object):
|
|||||||
if (is_WE and (now > 1000 and now < 2200)) or ((not is_WE) and (now > 800 and now < 2130)):
|
if (is_WE and (now > 1000 and now < 2200)) or ((not is_WE) and (now > 800 and now < 2130)):
|
||||||
brightness = 0.8
|
brightness = 0.8
|
||||||
else:
|
else:
|
||||||
brightness = 0.05
|
brightness = 0.02
|
||||||
|
|
||||||
self.IO.output.set_brightness(brightness)
|
self.IO.output.set_brightness(brightness)
|
||||||
|
|
||||||
@ -131,8 +131,9 @@ class ClockFace(object):
|
|||||||
|
|
||||||
self.run(output,(image, duration))
|
self.run(output,(image, duration))
|
||||||
|
|
||||||
def show_message(self, message):
|
def show_message(self, *args):
|
||||||
"""Runs a text message over the screen. Obviously needs the text"""
|
"""Runs a text message over the screen. Obviously needs the text"""
|
||||||
# keep in mind, message is a list of all input, separated by a space
|
# keep in mind, in this case args is a tuple of all words
|
||||||
message_str = " ".join(message)
|
message_str = " ".join(args)
|
||||||
|
print("SENDING: " + message_str)
|
||||||
self.text_scroll(message_str)
|
self.text_scroll(message_str)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user