Skip to content

Commit 46bb891

Browse files
nekunekohathach
authored andcommitted
Layout updated
1 parent 3b63db4 commit 46bb891

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/HID/hid_gamepad/hid_gamepad.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ void loop()
6464

6565
// Reset buttons
6666
Serial.println("No pressing buttons");
67-
gp.buttons = 0;
6867
gp.x = 0;
6968
gp.y = 0;
7069
gp.z = 0;
70+
gp.rz = 0;
7171
gp.rx = 0;
7272
gp.ry = 0;
73-
gp.rz = 0;
7473
gp.hat = 0;
74+
gp.buttons = 0;
7575
usb_hid.sendReport(0, &gp, sizeof(gp));
7676
delay(2000);
7777

@@ -253,14 +253,14 @@ void loop()
253253

254254
// Random touch
255255
Serial.println("Random touch");
256-
gp.buttons = random(0, 0xffff);
257256
gp.x = random(-127, 128);
258257
gp.y = random(-127, 128);
259258
gp.z = random(-127, 128);
259+
gp.rz = random(-127, 128);
260260
gp.rx = random(-127, 128);
261261
gp.ry = random(-127, 128);
262-
gp.rz = random(-127, 128);
263262
gp.hat = random(0, 9);
263+
gp.buttons = random(0, 0xffff);
264264
usb_hid.sendReport(0, &gp, sizeof(gp));
265265
delay(2000);
266266

0 commit comments

Comments
 (0)