From aafb1d649111bbe7691ddc8eeb73836a6ae6967f Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sun, 20 Jan 2013 18:14:15 +0100 Subject: [PATCH] Don't print the right joystick if it's a Navigation controller --- examples/Bluetooth/PS3BT/PS3BT.ino | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/Bluetooth/PS3BT/PS3BT.ino b/examples/Bluetooth/PS3BT/PS3BT.ino index 472768bb..35e57a23 100644 --- a/examples/Bluetooth/PS3BT/PS3BT.ino +++ b/examples/Bluetooth/PS3BT/PS3BT.ino @@ -31,10 +31,12 @@ void loop() { Serial.print(PS3.getAnalogHat(LeftHatX)); Serial.print(F("\tLeftHatY: ")); Serial.print(PS3.getAnalogHat(LeftHatY)); - Serial.print(F("\tRightHatX: ")); - Serial.print(PS3.getAnalogHat(RightHatX)); - Serial.print(F("\tRightHatY: ")); - Serial.print(PS3.getAnalogHat(RightHatY)); + if(!PS3.PS3NavigationConnected) { + Serial.print(F("\tRightHatX: ")); + Serial.print(PS3.getAnalogHat(RightHatX)); + Serial.print(F("\tRightHatY: ")); + Serial.print(PS3.getAnalogHat(RightHatY)); + } } //Analog button values can be read from almost all buttons