diff options
author | Jakob Stendahl <jakobste@uio.no> | 2021-01-12 16:07:57 +0100 |
---|---|---|
committer | Jakob Stendahl <jakobste@uio.no> | 2021-01-12 16:07:57 +0100 |
commit | 8ade112da0a06c1c114e11746551c76a2c146dc0 (patch) | |
tree | 3d0aceb90f766a4317b8f23e03b11c302caedd4c | |
parent | 23c95e883760db30b98d0b65a65a85cc5eb3597d (diff) | |
download | hoverbit-ble-8ade112da0a06c1c114e11746551c76a2c146dc0.tar.gz hoverbit-ble-8ade112da0a06c1c114e11746551c76a2c146dc0.zip |
:bug: Fix bluetooth send method
-rw-r--r-- | script.js | 7 | ||||
-rw-r--r-- | styles.css | 7 |
2 files changed, 10 insertions, 4 deletions
@@ -231,9 +231,10 @@ document.getElementById("btn_connect").onclick = async () => { if (device) { if (device.gatt.connected) { let command = - "T" + hoverControl.getThrottle() + - "R" + hoverControl.getRudder() + + "T" + hoverControl.getThrottle().toString() + + "R" + hoverControl.getRudder().toString() + "A" + (hoverControl.getArm() ? "1" : "0") + + "S0" + ":"; await services.uartService.sendText(command); } else { @@ -241,7 +242,7 @@ document.getElementById("btn_connect").onclick = async () => { device.gatt.disconnect(); } } - }, 50); + }, 70); } } @@ -101,7 +101,8 @@ body { margin-top: 5px; border: 1px solid black; background-color: #b5b5b5; - padding: 5px; + padding: 10px; + width: 120px; } .throttle { @@ -136,6 +137,10 @@ body { border: 1px solid black; } +.rudder-labels { + position: absolute; +} + .rudder-thumb { position: absolute; bottom: 0; |