Compare commits

...

3 Commits

Author SHA1 Message Date
2374365f0e Merge remote-tracking branch 'rpi/master' 2025-07-03 20:56:59 +02:00
f5f7184965 minor notes update 2025-07-03 20:56:43 +02:00
FReenen
a2eb47bc59 allow to send commands to boat 2025-07-03 20:55:37 +02:00
4 changed files with 10 additions and 4 deletions

View File

@@ -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>

View File

@@ -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):

View File

@@ -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;

View File

@@ -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)