From 83264ef11f8bfd268686cd3e63ccb7403a522acd Mon Sep 17 00:00:00 2001 From: tymek Date: Thu, 31 Jul 2025 18:31:02 +0200 Subject: [PATCH] pid steering --- steer-pid.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/steer-pid.py b/steer-pid.py index 279c2b2..5811f48 100644 --- a/steer-pid.py +++ b/steer-pid.py @@ -77,9 +77,6 @@ for chunk in stream.iter_content(chunk_size=1024): cv2.circle(frame, center, radius, (255, 0, 0), 2) cv2.circle(frame, center, 5, (0, 0, 255), -1) - # (Opcjonalnie) Wypisz pozycję - cv2.putText(frame, f"X:{int(x)} Y:{int(y)} R:{int(radius)}", (10, 30), - cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 2) if int(radius) >= 100: motorL.stop() @@ -114,6 +111,10 @@ for chunk in stream.iter_content(chunk_size=1024): xp = x ip += i + # (Opcjonalnie) Wypisz pozycję + cv2.putText(frame, f"P:{int(p)} I:{int(i)} D:{int(d)}", (10, 30), + cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 2) + # ============================ # 👆 KONIEC DETEKCJI PIŁKI 👆 # ============================