andrew / node-xbox-controller

:video_game: [UNMAINTAINED] Interface for Xbox 360 game controller into Node.js
http://libraries.io/npm/xbox-controller
MIT License
270 stars 49 forks source link

Change the controller to not crash when the controller disconnects and t... #5

Closed chiefcll closed 11 years ago

chiefcll commented 11 years ago

...o auto poll to reconnect to the controller. Cleaned up LEDs and send other commands such as rumble

andrew commented 11 years ago

Thanks!

andrew commented 11 years ago

I had a good poke around with the rumble this evening, looked at the source code for both linux and mac drivers and it looks like it's sending the correct thing, but throws an error, very strange.

The mac driver I'm using adds a system pref pane which makes the motors rumble when you pull the triggers, so it is possible.

andrew commented 11 years ago

So I managed to get rumble working, mainly by brute forcing every combination until one made the controller vibrate!

Commited here: https://github.com/andrew/node-xbox-controller/commit/a82c74eb8fae7ae73730c81c06c950112ac92e0b

The correct set of bytes is [0x00, 0x00, 0x04, left, right]

chiefcll commented 11 years ago

Excellent. Look forward to using it. Maybe when the drone crashes it should rumble

On Aug 23, 2013, at 6:46 PM, Andrew Nesbitt notifications@github.com wrote:

So I managed to get rumble working, mainly by brute forcing every combination until one made the controller vibrate!

a82c74e

The correct set of bytes is [0x00, 0x00, 0x04, left, right]

— Reply to this email directly or view it on GitHub.

andrew commented 11 years ago

You could also look for the vision error warning and rumble on that, usually happens when you get close to a wall.

andrew commented 11 years ago

I've also added you as a collaborator, thanks for your help with this library!

chiefcll commented 11 years ago

Did you see this patch?

https://github.com/chiefcll/drone-xbox-controller/commit/660feeb41ca80f6e693a728d267bf25fba0f624a

On Aug 23, 2013, at 7:05 PM, Andrew Nesbitt notifications@github.com wrote:

I've also added you as a collaborator, thanks for your help with this library!

— Reply to this email directly or view it on GitHub.

andrew commented 11 years ago

I did, just got back from holiday so not had time to play around with it yet.

Looks good, should get it merged in a few days.

chiefcll commented 11 years ago

That patch is what I did on my holiday. Enjoy.. Still have to figure out how to start the camera to record.

Chris

On Aug 23, 2013, at 7:14 PM, Andrew Nesbitt notifications@github.com wrote:

I did, just got back from holiday so not had time to play around with it yet.

Looks good, should get it merged in a few days.

— Reply to this email directly or view it on GitHub.