From 1a55616266a77ec93d97cd48e52c02bc90fcedf1 Mon Sep 17 00:00:00 2001 From: gdamms Date: Sat, 26 Mar 2022 17:37:07 +0100 Subject: [PATCH] fix: padding + time --- src/garage.py | 2 +- src/main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/garage.py b/src/garage.py index cf0b699..6128b3f 100644 --- a/src/garage.py +++ b/src/garage.py @@ -27,7 +27,7 @@ SECONDARY_COLOR_SLIDER = (380, 380 + TEAM_OFFSET) ITEM_X = (200, 450, 700) ITEM_Y = (300, 580, 860) -NB_STICKERS = (3, 3) +NB_STICKERS = (0, 0, 3, 3) NB_WHEELS = 23 NB_HATS = 20 NB_TEAMS = 2 diff --git a/src/main.py b/src/main.py index 275ccf4..d85c47f 100644 --- a/src/main.py +++ b/src/main.py @@ -36,7 +36,7 @@ if __name__ == "__main__": digits_loadout = len(str(nb_loadouts)) # initialisation de la liste au calcul de l'ETA - eta_list = [2.0 for _ in range(NB_ETA)] + eta_list = [10.0 for _ in range(NB_ETA)] # boucle principale sur les loadouts for (i, loadout) in enumerate(loadouts): @@ -71,9 +71,10 @@ if __name__ == "__main__": elapsed = time.time() - elapsed eta_list[i % NB_ETA] = elapsed estimation = int((nb_loadouts - i) * sum(eta_list) / NB_ETA) + formated_estimation = datetime.timedelta(seconds=estimation) logging.debug( - f"loadout {str(i).zfill(digits_loadout)}/{nb_loadouts} ({elapsed:.02f}s, ETA: {datetime.timedelta(seconds=estimation)}): {loadout}" + f"loadout {str(i).zfill(digits_loadout)}/{nb_loadouts} ({elapsed:.02f}s, ETA: {formated_estimation}): {loadout}" ) # fermeture de la db sqlite3