From 6800d0eb7a652bed4dac5449a5d5e3bab9a8de50 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Thu, 10 Aug 2023 08:24:08 -0500 Subject: [PATCH] Remove sign from prettytime(), as it fucks with the alignment with the new font --- colorbar-fastloop.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/colorbar-fastloop.py b/colorbar-fastloop.py index 3ba157f..0db7894 100644 --- a/colorbar-fastloop.py +++ b/colorbar-fastloop.py @@ -103,16 +103,7 @@ pixels.show() # Use datetime.timedelta to convert an int of seconds to a # string with the format MM:SS def prettytime(seconds): - # Add a negative sign to the output when current_time is negative. - # prettytime() puts the given value through abs() because the way - # datetime.timedelta() represents negative values is kind of a PITA - # to deal with. - if seconds < 0: - display_time_sign = "-" - else: - display_time_sign = "" - - return display_time_sign + str(datetime.timedelta(seconds=abs(seconds)))[2:] + return str(datetime.timedelta(seconds=abs(seconds)))[2:] # Set the color on a single neopixel based on colormode and