feat: add zoom

This commit is contained in:
2025-12-19 23:26:25 +03:00
parent d04d4a0cdc
commit 48885d567a
3 changed files with 42 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ from trajectory_drawer import TrajectoryDrawer
from yandex_map import YandexMap
from time import sleep
from pathlib import Path
import random
import cv2
import matplotlib.pyplot as plt
@@ -106,8 +107,16 @@ def main():
proc_time = np.array([])
zoom_next_event = random.randint(5, 10)
for i in range(10000000000):
print(f"Image #{i}")
if i == zoom_next_event:
r = random.randint(0, 1)
direction = ['up', 'down'][r]
simulator.change_zoom(direction)
zoom_next_event = i + random.randint(20, 40)
photo = simulator.get_photo()
command = pilot.handle(photo)