Skip to content

Commit 5b6dc84

Browse files
gamepad good
1 parent a8fa312 commit 5b6dc84

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

gamepad.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Simple Quadrotor Gamepad Controller</title>
77
<style>
8-
body {
9-
font-family: Arial, sans-serif;
10-
max-width: 600px; /* Increased width to accommodate new column */
11-
margin: 0 auto;
12-
padding: 20px;
13-
}
14-
h1 {
15-
font-size: 1.5em;
16-
margin-bottom: 15px;
17-
}
188
#gamepad-status {
199
padding: 8px;
2010
margin-bottom: 15px;

gamepad.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Mapper{
2727
if (diff > maxDiff) {
2828
maxDiff = diff;
2929
this.live_index = i;
30+
this.invert = (gamepad.axes[i] - this.base_values[i]) < 0;
3031
this.base = this.base_values[i];
3132
}
3233
if (diff > 0.5) {

0 commit comments

Comments
 (0)