aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script.js7
-rw-r--r--styles.css7
2 files changed, 10 insertions, 4 deletions
diff --git a/script.js b/script.js
index 85b5d61..9060db6 100644
--- a/script.js
+++ b/script.js
@@ -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);
}
}
diff --git a/styles.css b/styles.css
index dd18832..115a533 100644
--- a/styles.css
+++ b/styles.css
@@ -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;