This commit is contained in:
Laila van Reenen 2024-08-08 20:44:59 +02:00
parent 1c90656508
commit 038c8752dd
Signed by: LailaTheElf
GPG Key ID: 1F4E6EE3E6DDF769
2 changed files with 4 additions and 4 deletions

View File

@ -59,9 +59,9 @@ async def echoClients(client):
async def takeControll(client, boat):
global boats
print("DEBUG: " + client['id'] " takes controll of " + boat)
print("DEBUG: " + client['id'] + " takes controll of " + boat)
if (client['boat'] is not None):
boat["state"] = BOAT_STATE_AVAILABLE
client['boat']["state"] = BOAT_STATE_AVAILABLE
client["boat"] = None
for b in boats:
if (b['id'] == boat):
@ -75,7 +75,7 @@ async def takeControll(client, boat):
print("WARN: takeControll: " + boat["name"] + " not available (" + str(client["id"]) + ")")
break
else:
print("DEBUG: " boat " != " b['id'])
print("DEBUG: " + boat + " != " + b['id'])
async def freeBoat(boat):
global boats, clients

View File

@ -83,7 +83,7 @@
function selectBoat(e)
{
connection.send(clientId + ';ctrl;', e.target.id.split('boat')[1]);
connection.send(clientId + ';ctrl;' + e.target.id.split('boat')[1]);
console.log('ctrl:', e.target.id.split('boat')[1]);
stickEl.style.display = 'block';
boatListEl.style.display = 'none';