Check if PS3Connected is true instead

This commit is contained in:
Kristian Lauszus 2013-11-24 15:15:46 +01:00
parent 4a3c903322
commit b22f52895c
4 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@ 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) { if (PS3.PS3Connected) { // The Navigation controller only have one joystick
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: "));

View file

@ -40,7 +40,7 @@ void loop() {
Serial.print(PS3[i]->getAnalogHat(LeftHatX)); Serial.print(PS3[i]->getAnalogHat(LeftHatX));
Serial.print(F("\tLeftHatY: ")); Serial.print(F("\tLeftHatY: "));
Serial.print(PS3[i]->getAnalogHat(LeftHatY)); Serial.print(PS3[i]->getAnalogHat(LeftHatY));
if (!PS3[i]->PS3NavigationConnected) { // The Navigation controller only have one joystick if (PS3[i]->PS3Connected) { // The Navigation controller only have one joystick
Serial.print(F("\tRightHatX: ")); Serial.print(F("\tRightHatX: "));
Serial.print(PS3[i]->getAnalogHat(RightHatX)); Serial.print(PS3[i]->getAnalogHat(RightHatX));
Serial.print(F("\tRightHatY: ")); Serial.print(F("\tRightHatY: "));

View file

@ -59,7 +59,7 @@ void loop() {
output += PS3.getAnalogHat(LeftHatX); output += PS3.getAnalogHat(LeftHatX);
output += "\tLeftHatY: "; output += "\tLeftHatY: ";
output += PS3.getAnalogHat(LeftHatY); output += PS3.getAnalogHat(LeftHatY);
if (!PS3.PS3NavigationConnected) { if (PS3.PS3Connected) { // The Navigation controller only have one joystick
output += "\tRightHatX: "; output += "\tRightHatX: ";
output += PS3.getAnalogHat(RightHatX); output += PS3.getAnalogHat(RightHatX);
output += "\tRightHatY: "; output += "\tRightHatY: ";

View file

@ -32,7 +32,7 @@ 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) { if (PS3.PS3Connected) { // The Navigation controller only have one joystick
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: "));