Compare commits
3 Commits
c84d17a4d9
...
2374365f0e
| Author | SHA1 | Date | |
|---|---|---|---|
|
2374365f0e
|
|||
|
f5f7184965
|
|||
|
|
a2eb47bc59 |
@@ -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 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -68,6 +68,7 @@ int cmd_contrl(char* line, void* cli)
|
||||
return out;
|
||||
}
|
||||
|
||||
// servotrim:0 410;614;819
|
||||
int cmd_servotrim(char* line, void* cli)
|
||||
{
|
||||
uint8_t ch;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define SERVO_DUTY_MIN ( 410) // 2**13 * (1000/20000) // 1000us of the 20ms
|
||||
#define SERVO_DUTY_MAX ( 819) // 2**13 * (2000/20000) // 2000us of the 20ms
|
||||
// #define SERVO_DUTY_MAX (1024) // 2**13 * (2500/20000) // 2500us of the 20ms
|
||||
#define SERVO_DUTY_MID ( 614) // 2**13 * (1500/20000) // 2500us of the 20ms
|
||||
#define SERVO_DUTY_MID ( 614) // 2**13 * (1500/20000) // 1500us of the 20ms
|
||||
|
||||
#define SERVO_DUTY_DIFF (SERVO_DUTY_MAX - SERVO_DUTY_MIN)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user