mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed rumble issue in example sketch
This commit is contained in:
parent
8b7efc3ed6
commit
b967d610c0
1 changed files with 1 additions and 1 deletions
|
@ -20,6 +20,7 @@ void setup() {
|
||||||
void loop() {
|
void loop() {
|
||||||
Usb.Task();
|
Usb.Task();
|
||||||
if(Xbox.Xbox360Connected) {
|
if(Xbox.Xbox360Connected) {
|
||||||
|
Xbox.setRumbleOn(Xbox.getButton(L2),Xbox.getButton(R2));
|
||||||
if(Xbox.getAnalogHat(LeftHatX) > 7500 || Xbox.getAnalogHat(LeftHatX) < -7500 || Xbox.getAnalogHat(LeftHatY) > 7500 || Xbox.getAnalogHat(LeftHatY) < -7500 || Xbox.getAnalogHat(RightHatX) > 7500 || Xbox.getAnalogHat(RightHatX) < -7500 || Xbox.getAnalogHat(RightHatY) > 7500 || Xbox.getAnalogHat(RightHatY) < -7500) {
|
if(Xbox.getAnalogHat(LeftHatX) > 7500 || Xbox.getAnalogHat(LeftHatX) < -7500 || Xbox.getAnalogHat(LeftHatY) > 7500 || Xbox.getAnalogHat(LeftHatY) < -7500 || Xbox.getAnalogHat(RightHatX) > 7500 || Xbox.getAnalogHat(RightHatX) < -7500 || Xbox.getAnalogHat(RightHatY) > 7500 || Xbox.getAnalogHat(RightHatY) < -7500) {
|
||||||
if(Xbox.getAnalogHat(LeftHatX) > 7500 || Xbox.getAnalogHat(LeftHatX) < -7500) {
|
if(Xbox.getAnalogHat(LeftHatX) > 7500 || Xbox.getAnalogHat(LeftHatX) < -7500) {
|
||||||
Serial.print(F("LeftHatX: "));
|
Serial.print(F("LeftHatX: "));
|
||||||
|
@ -101,7 +102,6 @@ void loop() {
|
||||||
Serial.print(F(" - R2:"));
|
Serial.print(F(" - R2:"));
|
||||||
Serial.print(Xbox.getButton(R2));
|
Serial.print(Xbox.getButton(R2));
|
||||||
}
|
}
|
||||||
Xbox.setRumbleOn(Xbox.getButton(L2),Xbox.getButton(R2));
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue