Don't print the right joystick if it's a Navigation controller

This commit is contained in:
Kristian Sloth Lauszus 2013-01-20 18:14:15 +01:00
parent 6598bca58a
commit aafb1d6491

View file

@ -31,11 +31,13 @@ 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_ANALOG) > 0 || PS3.getAnalogButton(R2_ANALOG) > 0) { if(PS3.getAnalogButton(L2_ANALOG) > 0 || PS3.getAnalogButton(R2_ANALOG) > 0) {