From 43a9d4656ab663365c63d218abbb82c9aaddb6de Mon Sep 17 00:00:00 2001 From: gdamms Date: Sat, 26 Mar 2022 19:13:36 +0100 Subject: [PATCH] fix: cahngement de model avant les changement d'item --- src/garage.py | 10 +++++----- src/main.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/garage.py b/src/garage.py index c0489ee..5046ebc 100644 --- a/src/garage.py +++ b/src/garage.py @@ -32,7 +32,7 @@ NB_WHEELS = 23 NB_HATS = 23 NB_TEAMS = 2 -DELAY = 0.1 +DELAY = 0.01 NB_PRIMARY_COLORS = 3 NB_SECONDARY_COLORS = 1 @@ -163,25 +163,25 @@ def newCar(model: int, sticker: int, wheel: int, hat: int, team: int, primary_co time.sleep(DELAY) # select sticker, if necessary - if sticker != old_sticker: + if sticker != old_sticker or model != old_model: selectItem(STICKER_MENU_BTN, sticker) old_sticker = sticker time.sleep(DELAY) # select wheel, if necessary - if wheel != old_wheel: + if wheel != old_wheel or model != old_model: selectItem(WHEEL_MENU_BTN, wheel) old_wheel = wheel time.sleep(DELAY) # select hat, if necessary - if hat != old_hat: + if hat != old_hat or model != old_model: selectItem(HAT_MENU_BTN, hat) old_hat = hat time.sleep(DELAY) # select color, if necessary - if team != old_team or primary_color != old_primary_color[team] or secondary_color != old_secondary_color[team]: + if team != old_team or primary_color != old_primary_color[team] or secondary_color != old_secondary_color[team] or model != old_model: selectColor(team, primary_color, secondary_color) old_team = team old_primary_color[old_team] = primary_color diff --git a/src/main.py b/src/main.py index d85c47f..d8f5235 100644 --- a/src/main.py +++ b/src/main.py @@ -10,7 +10,7 @@ NB_ETA = 25 NB_ROTATIONS = 10 -N_START = 0 +N_START = 348 N_STOP = 0 DELAY_TRANSITION = 0.3