diff options
| author | Edvin <[email protected]> | 2025-05-16 16:01:42 +0200 |
|---|---|---|
| committer | Edvin <[email protected]> | 2025-05-16 16:01:42 +0200 |
| commit | ca9e7ff70070c3499e0ec3aa125370655e31067d (patch) | |
| tree | 4a7ccf25c526147e0a02b0ced9bbc8b6c9fb4209 /bt.py | |
| parent | a9eef22ca75317f86dbaa44d9b5d5794b7ff7016 (diff) | |
Working on goal pairing and fully autonomous drivemain
Diffstat (limited to 'bt.py')
| -rwxr-xr-x | bt.py | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -26,13 +26,26 @@ while read != "1000": read = read.decode("utf-8").strip('\n') print(f"{read}") - sleep(1) + if "98" in read: + while read == "98": + read = sys.stdin.readline().strip('\n') + print(f"{read}") + with open("position.txt", "r") as f: + for line in f: + line = line.strip("\n") + x, y = line.split(",") + x = int(x) + y = int(y) + recv_sock.send(f"98, {x}, {y}\n".encode()) + # message = message + f"{x}, {y}, " + f.close() + read = "99" + else: + sleep(0.5) # Acknowledge ÖS command recv_sock.send(f"{read}, ".encode()) # Remember NEW LINE for ÖS to be able to read lines. - # TODO Maybe obstruction ack can be sent here? - # Send DWM data if read == "10": sleep(1) |
