mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Have PS3.printStatusString() print to a new line each time it is called.
This commit is contained in:
parent
9eed52026b
commit
0f80087ee7
2 changed files with 7 additions and 7 deletions
|
@ -158,9 +158,9 @@ bool PS3BT::getStatus(StatusEnum c) {
|
|||
}
|
||||
|
||||
void PS3BT::printStatusString() {
|
||||
char statusOutput[100]; // Max string length plus null character
|
||||
char statusOutput[102]; // Max string length plus null character
|
||||
if(PS3Connected || PS3NavigationConnected) {
|
||||
strcpy_P(statusOutput, PSTR("ConnectionStatus: "));
|
||||
strcpy_P(statusOutput, PSTR("\r\nConnectionStatus: "));
|
||||
|
||||
if(getStatus(Plugged)) strcat_P(statusOutput, PSTR("Plugged"));
|
||||
else if(getStatus(Unplugged)) strcat_P(statusOutput, PSTR("Unplugged"));
|
||||
|
@ -185,7 +185,7 @@ void PS3BT::printStatusString() {
|
|||
else if(getStatus(Bluetooth)) strcat_P(statusOutput, PSTR("Bluetooth - Rumble is off"));
|
||||
else strcat_P(statusOutput, PSTR("Error"));
|
||||
} else if(PS3MoveConnected) {
|
||||
strcpy_P(statusOutput, PSTR("PowerRating: "));
|
||||
strcpy_P(statusOutput, PSTR("\r\nPowerRating: "));
|
||||
|
||||
if(getStatus(MoveCharging)) strcat_P(statusOutput, PSTR("Charging"));
|
||||
else if(getStatus(MoveNotCharging)) strcat_P(statusOutput, PSTR("Not Charging"));
|
||||
|
@ -196,7 +196,7 @@ void PS3BT::printStatusString() {
|
|||
else if(getStatus(MoveFull)) strcat_P(statusOutput, PSTR("Full"));
|
||||
else strcat_P(statusOutput, PSTR("Error"));
|
||||
} else
|
||||
strcpy_P(statusOutput, PSTR("Error"));
|
||||
strcpy_P(statusOutput, PSTR("\r\nError"));
|
||||
|
||||
USB_HOST_SERIAL.write(statusOutput);
|
||||
}
|
||||
|
|
|
@ -362,9 +362,9 @@ bool PS3USB::getStatus(StatusEnum c) {
|
|||
}
|
||||
|
||||
void PS3USB::printStatusString() {
|
||||
char statusOutput[100]; // Max string length plus null character
|
||||
char statusOutput[102]; // Max string length plus null character
|
||||
if(PS3Connected || PS3NavigationConnected) {
|
||||
strcpy_P(statusOutput, PSTR("ConnectionStatus: "));
|
||||
strcpy_P(statusOutput, PSTR("\r\nConnectionStatus: "));
|
||||
|
||||
if(getStatus(Plugged)) strcat_P(statusOutput, PSTR("Plugged"));
|
||||
else if(getStatus(Unplugged)) strcat_P(statusOutput, PSTR("Unplugged"));
|
||||
|
@ -389,7 +389,7 @@ void PS3USB::printStatusString() {
|
|||
else if(getStatus(Bluetooth)) strcat_P(statusOutput, PSTR("Bluetooth - Rumble is off"));
|
||||
else strcat_P(statusOutput, PSTR("Error"));
|
||||
} else
|
||||
strcpy_P(statusOutput, PSTR("Error"));
|
||||
strcpy_P(statusOutput, PSTR("\r\nError"));
|
||||
|
||||
USB_HOST_SERIAL.write(statusOutput);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue