From 8a4fd87622cc13ca4f501b98502585ca2b2aaddd Mon Sep 17 00:00:00 2001 From: Edvin Date: Tue, 6 May 2025 12:17:53 +0200 Subject: Hopefully fixed DWM reading incorrect values at first --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 7b04670..01eccb4 100755 --- a/main.py +++ b/main.py @@ -81,6 +81,8 @@ if bto.find("Connected") != -1: #print("Quality factor: " + qf) # if float(qf) > 80: print(f"x: {x}, y: {y}") + print(f"Current direction: {curDir}") + print(f"Desired direction: {desDir}") if newCommand: print(f"Command: {bto}") @@ -151,8 +153,7 @@ if bto.find("Connected") != -1: # curDir = (math.atan2(curY - oldY, curX - oldX) + math.pi) * (180/math.pi) # if backward == True: # a = a - 180 - print(f"Current direction: {curDir}") - print(f"Desired direction: {desDir}") + NANO.write(b"Stop\n") curDir = math.atan2(y - oldY, x - oldX) -- cgit v1.2.3