From 5218e00d957035f1cd2b7d883795b0acb7ade71b Mon Sep 17 00:00:00 2001 From: Edvin Date: Mon, 12 May 2025 13:55:57 +0200 Subject: Added reset for status update iteration and increased delay --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index eb2b797..f2a84d1 100755 --- a/main.py +++ b/main.py @@ -106,7 +106,7 @@ normDir = 0 writeAngleToFile(desDir) iteration = 1 -delay = 20 # Delay status command to every 20 loops +delay = 100 # Delay status command to every 20 loops if bto.find("Connected") != -1: nanoBtMessage = "Bluetooth connected " + bto[13:].translate({ord(c): None for c in ':'}) # Address to send to nano @@ -294,6 +294,7 @@ if bto.find("Connected") != -1: dirstatus = str(curDir).zfill(3) if iteration > delay: NANO.write(f"Current status {xstatus} {ystatus} {dirstatus}\n".encode()) + iteration = 0 iteration += 1 print("Terminating LIDAR process") -- cgit v1.2.3