← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdvin <[email protected]>2025-05-12 13:55:57 +0200
committerEdvin <[email protected]>2025-05-12 13:55:57 +0200
commit5218e00d957035f1cd2b7d883795b0acb7ade71b (patch)
tree8ddf2452e2b2070bbef91d6944aa901cfc3d9b6d
parente7c40d60cd1208cee3e9813192deed3d7f8c431c (diff)
Added reset for status update iteration and increased delay
-rwxr-xr-xmain.py3
1 files changed, 2 insertions, 1 deletions
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")