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 Jan 17, 2020
1 parent b0cdf7d commit b58edb4
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 @@ -20,9 +20,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 b58edb4

Please sign in to comment.