If we disable CDC like they did, all 4 gamepads work again with the rest of the code unchanged. I just dropped the modified libraries into my project to avoid any system wide issues with other projects.
Then to upload new code, I just plug in the device, and toggle gnd+reset and the bootloader will accept new code.
I looked into the 2 controller limit issue.
Reference to the hardware limitation here: https://github.com/NicoHood/HID/wiki/API-Documentation
"The CDC Serial uses 3 endpoints. This means you can add up to 3 devices for the 32u4 and 1 for the 8/16/32u2. If you add more, some will be ignored."
I found a fix, that others have used when creating usb keyboards. It disables the CDC to free up resources. https://github.com/gdsports/usb-metamorph/tree/master/USBSerPassThruLine
If we disable CDC like they did, all 4 gamepads work again with the rest of the code unchanged. I just dropped the modified libraries into my project to avoid any system wide issues with other projects.
Then to upload new code, I just plug in the device, and toggle gnd+reset and the bootloader will accept new code.