Adjusted colors, fixed time freezinh

This commit is contained in:
Remy Moll
2020-11-10 08:46:05 +01:00
parent f3dc98d884
commit 1fa1d7cb67
3 changed files with 5 additions and 4 deletions

View File

@@ -33,10 +33,11 @@ digits = {
##place of numbers, invariable
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
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)
time = "0" * (4 - len(str(time))) + str(time)
time_split = [int(i) for i in time]

View File

@@ -94,7 +94,7 @@ class OutputHandler():
else:
face2 = converter.time_converter(int(weather["low"]+weather["high"]))
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))