diff --git a/commander.html b/commander.html index 3c6a085..0941899 100644 --- a/commander.html +++ b/commander.html @@ -174,7 +174,10 @@ function getBoatLog(e) { - alert("loggy log"); + let cmd = prompt("enter command"); + let boat = getDataFomEl(e.target); + console.log("send cmd", boat, cmd); + conn.send(passEl.value + ";sendcmd;" + boat['id'] + ";" + cmd); } function reqBoats() @@ -307,4 +310,4 @@ } - \ No newline at end of file + diff --git a/ground-station.py b/ground-station.py index 1dbc0f8..e594bfd 100644 --- a/ground-station.py +++ b/ground-station.py @@ -134,8 +134,10 @@ async def sendcmd(data): if b['id'] == data[2]: del data[0] del data[1] + del data[2] + print(data) data = ";".join(data) - await sendToBoat(b, data) + await sendToBoat(b, data + "\n") return async def kick_client(clientId):