From 1c906565085ea5276e3e0bb7f478cdb034bc161e Mon Sep 17 00:00:00 2001 From: FReenen Date: Thu, 8 Aug 2024 20:41:12 +0200 Subject: [PATCH] debug --- ground-station.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ground-station.py b/ground-station.py index 003adee..66b4122 100644 --- a/ground-station.py +++ b/ground-station.py @@ -59,11 +59,13 @@ async def echoClients(client): async def takeControll(client, boat): global boats + print("DEBUG: " + client['id'] " takes controll of " + boat) if (client['boat'] is not None): boat["state"] = BOAT_STATE_AVAILABLE client["boat"] = None for b in boats: if (b['id'] == boat): + print("DEBUG: boat found") if (boat['state'] == BOAT_STATE_AVAILABLE): boat["state"] = BOAT_STATE_INCTRL print("take controll: " + str(client["id"]) + " -> " + boat["name"]) @@ -72,6 +74,8 @@ async def takeControll(client, boat): else: print("WARN: takeControll: " + boat["name"] + " not available (" + str(client["id"]) + ")") break + else: + print("DEBUG: " boat " != " b['id']) async def freeBoat(boat): global boats, clients