diff --git a/rpi/antRender.py b/rpi/antRender.py index 632fbb3..0219c0a 100644 --- a/rpi/antRender.py +++ b/rpi/antRender.py @@ -56,6 +56,13 @@ class Point2D: return (self.x, self.y) == (other.x, other.y) +def set_ProotScreen(): + prootScreen_frame_canvas = matrix.CreateFrameCanvas() + image_prootScreen = Image.open("faces/eyeLeftOpen.png") + prootScreen_frame_canvas.SetImage(image_prootScreen, unsafe=False) + matrix.SwapOnVSync(prootScreen_frame_canvas) + + def mirror_points(points: list[Point2D]) -> list[Point2D]: mirrored_points = [] for point in points: @@ -148,6 +155,14 @@ def interpolate_point_pairs(pairs: list[tuple[Point2D, Point2D]], percentage: fl return interpolated_points +print("start setting ProotScreen") +startT = curr_time = round(time.time()*1000) +# setting ProotScreen, This is the loading splash screen +set_ProotScreen() + +endT = curr_time = round(time.time()*1000) +print("setting ProotScreen took: " + str(endT - startT) + " ms") + print("start configuring matrix") @@ -290,6 +305,11 @@ client.loop_start() while True: + # this sleep sets the time between finishing one screen update and the next starting + # TODO replace this mechanism with an interupt to use the cpu time between frame updates. time.sleep(0.01) update_screen() - \ No newline at end of file + + +# TODO create a splash screen to display super quick before the rest of the assets are loading +