fix: start and stop point

This commit is contained in:
gdamms 2022-03-25 18:00:37 +01:00
parent 75dc12eb49
commit 6d7dee82bc
2 changed files with 15 additions and 5 deletions

View file

@ -31,10 +31,10 @@ NB_WHEELS = 23
NB_HATS = 20
NB_TEAMS = 2
DELAY = 0.1
DELAY = 0.01
NB_PRIMARY_COLORS = 5
NB_SECONDARY_COLORS = 5
NB_PRIMARY_COLORS = 3
NB_SECONDARY_COLORS = 1
old_model = None

View file

@ -31,10 +31,20 @@ if __name__ == "__main__":
database = connect_to_database("dataset.db")
loadouts = generate_loadouts()
NB_ROTATIONS = 20
NB_ROTATIONS = 1
N_START = 9984
N_STOP = 1e10
while detect_focus(device):
for (i, loadout) in enumerate(loadouts):
# Sauter les N premiers
if i < N_START:
continue
if i >= N_STOP:
exit(0)
((model, sticker), wheel, hat, team, primary_color, secondary_color) = loadout
logging.debug(f"loadout {i}: {((model, sticker), wheel, hat, team, primary_color, secondary_color)}")
@ -42,9 +52,9 @@ if __name__ == "__main__":
sleep(0.5)
for x_rotation in range(NB_ROTATIONS):
rotate(130, 0)
uuid = take_screenshot(device)
insert_into_database(database, uuid, loadout, x_rotation, 0)
# rotate(130, 0)
set_notifications(device, True)