Skip to content

Commit

Permalink
Add elite controller support
Browse files Browse the repository at this point in the history
  • Loading branch information
medusalix committed May 23, 2020
1 parent a95589e commit ea74eca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ The following Xbox One controllers are currently compatible with the driver:
|--------------|------|-------------------------|--------------|
| 1537 | 2013 | Original controller | **Broken** |
| 1697 | 2015 | Added audio jack | **Working** |
| 1698 | 2015 | Elite controller | **Working** |
| 1708 | 2016 | Bluetooth functionality | **Working** |

Elite controllers may be added in the future.
| ???? | 2019 | Elite controller 2 | **Untested** |

## Planned features

Expand Down
5 changes: 4 additions & 1 deletion controller/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@ void Controller::packetReceived(const Bytes &packet)
);
}

// Elite controllers send a larger input packet
// The button remapping is done in hardware
// The "non-remapped" input is appended to the packet
else if (
frame->command == CMD_INPUT &&
frame->length == sizeof(InputData)
frame->length >= sizeof(InputData)
) {
const InputData *input = packet.toStruct<InputData>(
sizeof(ControllerFrame)
Expand Down

0 comments on commit ea74eca

Please sign in to comment.