mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Don't print values if it's a Navigation controller
This commit is contained in:
parent
391f5ece4d
commit
d2bb7b8338
1 changed files with 10 additions and 6 deletions
|
@ -30,18 +30,22 @@ void loop() {
|
||||||
Serial.print(PS3.getAnalogHat(LeftHatX));
|
Serial.print(PS3.getAnalogHat(LeftHatX));
|
||||||
Serial.print(F("\tLeftHatY: "));
|
Serial.print(F("\tLeftHatY: "));
|
||||||
Serial.print(PS3.getAnalogHat(LeftHatY));
|
Serial.print(PS3.getAnalogHat(LeftHatY));
|
||||||
|
if(!PS3.PS3NavigationConnected) {
|
||||||
Serial.print(F("\tRightHatX: "));
|
Serial.print(F("\tRightHatX: "));
|
||||||
Serial.print(PS3.getAnalogHat(RightHatX));
|
Serial.print(PS3.getAnalogHat(RightHatX));
|
||||||
Serial.print(F("\tRightHatY: "));
|
Serial.print(F("\tRightHatY: "));
|
||||||
Serial.print(PS3.getAnalogHat(RightHatY));
|
Serial.print(PS3.getAnalogHat(RightHatY));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Analog button values can be read from almost all buttons
|
// Analog button values can be read from almost all buttons
|
||||||
if(PS3.getAnalogButton(L2) || PS3.getAnalogButton(R2)) {
|
if(PS3.getAnalogButton(L2) || PS3.getAnalogButton(R2)) {
|
||||||
Serial.print(F("\r\nL2: "));
|
Serial.print(F("\r\nL2: "));
|
||||||
Serial.print(PS3.getAnalogButton(L2));
|
Serial.print(PS3.getAnalogButton(L2));
|
||||||
|
if(!PS3.PS3NavigationConnected) {
|
||||||
Serial.print(F("\tR2: "));
|
Serial.print(F("\tR2: "));
|
||||||
Serial.print(PS3.getAnalogButton(R2));
|
Serial.print(PS3.getAnalogButton(R2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(PS3.getButtonClick(PS))
|
if(PS3.getButtonClick(PS))
|
||||||
Serial.print(F("\r\nPS"));
|
Serial.print(F("\r\nPS"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue