Forgot some return statements in case the controller isn't connected

This commit is contained in:
Kristian Sloth Lauszus 2013-04-03 18:12:05 +02:00
parent 7731f17c21
commit bbfd49310c
2 changed files with 8 additions and 4 deletions

View file

@ -108,7 +108,8 @@ double PS3BT::getAngle(Angle a) {
accXval = -(int16_t)(getSensor(aXmove) - zeroG);
accYval = (int16_t)(getSensor(aYmove) - zeroG);
accZval = (int16_t)(getSensor(aZmove) - zeroG);
}
} else
return 0;
// Convert to 360 degrees resolution
// atan2 outputs the value of -π to π (radians)
@ -162,7 +163,8 @@ String PS3BT::getTemperature() {
output += String(input % 100);
return output;
}
} else
return "Error";
}
bool PS3BT::getStatus(Status c) {
@ -219,7 +221,8 @@ String PS3BT::getStatusString() {
else strcat(statusOutput, "Error");
return statusOutput;
}
} else
return "Error";
}
void PS3BT::Reset() {

View file

@ -390,7 +390,8 @@ String PS3USB::getStatusString() {
else strcat(statusOutput, "Error");
return statusOutput;
}
} else
return "Error";
}
/* Playstation Sixaxis Dualshock and Navigation Controller commands */