Adjusted colors, fixed time freezinh
This commit is contained in:
parent
f3dc98d884
commit
1fa1d7cb67
@ -33,10 +33,11 @@ digits = {
|
|||||||
##place of numbers, invariable
|
##place of numbers, invariable
|
||||||
digit_position = [[2,4], [2,10], [9,4], [9,10]]
|
digit_position = [[2,4], [2,10], [9,4], [9,10]]
|
||||||
|
|
||||||
def time_converter(time=datetime.datetime.now().strftime("%H%M")):
|
def time_converter(time=""):
|
||||||
"""Converts 4-digit time to a pixel-matrix
|
"""Converts 4-digit time to a pixel-matrix
|
||||||
returns: np.array((16, 16))"""
|
returns: np.array((16, 16))"""
|
||||||
#time = datetime.datetime.now().strftime("%H%M")
|
if time == "":
|
||||||
|
time = datetime.datetime.now().strftime("%H%M")
|
||||||
pixels = np.zeros((16,16),dtype=np.uint8)
|
pixels = np.zeros((16,16),dtype=np.uint8)
|
||||||
time = "0" * (4 - len(str(time))) + str(time)
|
time = "0" * (4 - len(str(time))) + str(time)
|
||||||
time_split = [int(i) for i in time]
|
time_split = [int(i) for i in time]
|
||||||
|
@ -94,7 +94,7 @@ class OutputHandler():
|
|||||||
else:
|
else:
|
||||||
face2 = converter.time_converter(int(weather["low"]+weather["high"]))
|
face2 = converter.time_converter(int(weather["low"]+weather["high"]))
|
||||||
face2 = np.concatenate((face2[:8,...],2*face2[8:,...]))
|
face2 = np.concatenate((face2[:8,...],2*face2[8:,...]))
|
||||||
face2_3d = self.matrix_add_depth(face2,[[10,10,200],[150,150,10]])
|
face2_3d = self.matrix_add_depth(face2,[[0, 102, 255],[255, 102, 0]])
|
||||||
|
|
||||||
face = np.zeros((max(face1_3d.shape[0],face2_3d.shape[0]),face1_3d.shape[1]+face2_3d.shape[1],3))
|
face = np.zeros((max(face1_3d.shape[0],face2_3d.shape[0]),face1_3d.shape[1]+face2_3d.shape[1],3))
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class ModuleWrapper():
|
|||||||
self.bot = bot_module
|
self.bot = bot_module
|
||||||
self.time_thread = Thread(target=self.mainloop)
|
self.time_thread = Thread(target=self.mainloop)
|
||||||
self.time_thread.start()
|
self.time_thread.start()
|
||||||
self.weather = {"weather":"", "high":"", "low":"", "show":"weather"}
|
self.weather = {"weather":"", "high":"", "low":"", "show":"temps"}
|
||||||
|
|
||||||
|
|
||||||
def mainloop(self):
|
def mainloop(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user