allow to send commands to boat
This commit is contained in:
parent
da75d0a2a0
commit
a2eb47bc59
@ -174,7 +174,10 @@
|
|||||||
|
|
||||||
function getBoatLog(e)
|
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()
|
function reqBoats()
|
||||||
@ -307,4 +310,4 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -134,8 +134,10 @@ async def sendcmd(data):
|
|||||||
if b['id'] == data[2]:
|
if b['id'] == data[2]:
|
||||||
del data[0]
|
del data[0]
|
||||||
del data[1]
|
del data[1]
|
||||||
|
del data[2]
|
||||||
|
print(data)
|
||||||
data = ";".join(data)
|
data = ";".join(data)
|
||||||
await sendToBoat(b, data)
|
await sendToBoat(b, data + "\n")
|
||||||
return
|
return
|
||||||
|
|
||||||
async def kick_client(clientId):
|
async def kick_client(clientId):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user