From 3e5486d9b797696690c5ccb4fbbc8e080ae47a66 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:58:01 -0500 Subject: [PATCH] fix: add default y-coordinate in draw_text method --- src/display_manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/display_manager.py b/src/display_manager.py index 1f3d20ad..53d25963 100644 --- a/src/display_manager.py +++ b/src/display_manager.py @@ -254,6 +254,10 @@ class DisplayManager: text_width = width x = (self.matrix.width - text_width) // 2 + # Set default y position if not provided + if y is None: + y = 0 # Default to top of display + # Draw the text if isinstance(current_font, freetype.Face): self._draw_bdf_text(text, x, y, color)