Added support for the Sony Playstation Move navigation controller, and maybe it's alternative one...main
@@ -255,8 +255,9 @@ void displayPS3Data() | |||
if ((buttons & 0x04) && !(buttons_prev & 0x04)) show_changed_data = !show_changed_data; | |||
// See about maybe pair... | |||
if ((buttons & 0x10000) && !(buttons_prev & 0x10000) && (buttons & 0x0001)) { | |||
if ((buttons & 0x10000) && !(buttons_prev & 0x10000) && (buttons & 0x0C01)) { | |||
// PS button just pressed and select button pressed act like PS4 share like... | |||
// Note: you can use either R1 or L1 with the PS button, to work with Sony Move Navigation... | |||
Serial.print("\nPS3 Pairing Request"); | |||
if (!last_bdaddr[0] && !last_bdaddr[1] && !last_bdaddr[2] && !last_bdaddr[3] && !last_bdaddr[4] && !last_bdaddr[5]) { | |||
Serial.println(" - failed - no Bluetooth adapter has been plugged in"); |
@@ -165,7 +165,8 @@ void USBHIDParser::control(const Transfer_t *transfer) | |||
println(" got report descriptor"); | |||
parse(); | |||
queue_Data_Transfer(in_pipe, report, in_size, this); | |||
if (device->idVendor == 0x054C && device->idProduct == 0x0268) { | |||
if (device->idVendor == 0x054C && | |||
((device->idProduct == 0x0268) || (device->idProduct == 0x042F) || (device->idProduct == 0x03D5))) { | |||
println("send special PS3 feature command"); | |||
mk_setup(setup, 0x21, 9, 0x03F4, 0, 4); // ps3 tell to send report 1? | |||
static uint8_t ps3_feature_F4_report[] = {0x42, 0x0c, 0x00, 0x00}; |
@@ -41,6 +41,8 @@ JoystickController::product_vendor_mapping_t JoystickController::pid_vid_mapping | |||
{ 0x045e, 0x02ea, XBOXONE, false },{ 0x045e, 0x02dd, XBOXONE, false }, | |||
{ 0x045e, 0x0719, XBOX360, false}, | |||
{ 0x054C, 0x0268, PS3, true}, | |||
{ 0x054C, 0x042F, PS3, true}, // PS3 Navigation controller | |||
{ 0x054C, 0x03D5, PS3, true}, // PS3 Motion controller | |||
{ 0x054C, 0x05C4, PS4, true}, {0x054C, 0x09CC, PS4, true } | |||
}; | |||
@@ -921,6 +923,9 @@ bool JoystickController::mapNameToJoystickType(const uint8_t *remoteName) | |||
} else if (strncmp((const char *)remoteName, "PLAYSTATION(R)3", 15) == 0) { | |||
DBGPrintf(" JoystickController::mapNameToJoystickType %x %s - set to PS3\n", (uint32_t)this, remoteName); | |||
joystickType_ = PS3; | |||
} else if (strncmp((const char *)remoteName, "Navigation Controller", 21) == 0) { | |||
DBGPrintf(" JoystickController::mapNameToJoystickType %x %s - set to PS3\n", (uint32_t)this, remoteName); | |||
joystickType_ = PS3; | |||
} else if (strncmp((const char *)remoteName, "Xbox Wireless", 13) == 0) { | |||
DBGPrintf(" JoystickController::mapNameToJoystickType %x %s - set to XBOXONE\n", (uint32_t)this, remoteName); | |||
joystickType_ = XBOXONE; |