From 504b5156f85f7cbdec41e0bf718c5e984b820e12 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 31 Mar 2022 00:39:01 -0400 Subject: [PATCH] fixing text formatting --- pi-calendar-sign.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pi-calendar-sign.py b/pi-calendar-sign.py index 785fe42..8b63c8f 100644 --- a/pi-calendar-sign.py +++ b/pi-calendar-sign.py @@ -32,7 +32,14 @@ def is_event_active(events, now): def is_work_time(now): return now < WORK_STOP and now > WORK_START +def format_text(text): + text = text[:16] + text += f"\n" + text[16:] + return text + def update_display(color, text, cursor = False, blink = False): + print(text) + text = format_text(text) print(text) lcd.color = color lcd.message = text