Comments (8)
Yes, this is a low priority to-do item. Pull requests are welcome if anyone already knows how to do this.
from xjoy.
Yes this could be great, is quite anoying to see the leds cycling, you may take a look to this https://github.com/mfosse/JoyCon-Driver that thing is a similar thing to this and is capable of stopping the cycling and set the leds to one position.
from xjoy.
Yes, I've looked extensively through that code, though I don't quite understand the initialization sequence, but anyone is free to submit a pull request ;)
from xjoy.
printf("setting LEDs...\n"); for (int r = 0; r < 5; ++r) { for (int i = 0; i < joycons.size(); ++i) { Joycon *jc = &joycons[i]; // Player LED Enable memset(buf, 0x00, 0x40); if (i == 0) { buf[0] = 0x0 | 0x0 | 0x0 | 0x1; // solid 1 } if (i == 1) { if (settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x0 | 0x1; // solid 1 } else if (!settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x2 | 0x0; // solid 2 } } //buf[0] = 0x80 | 0x40 | 0x2 | 0x1; // Flash top two, solid bottom two //buf[0] = 0x8 | 0x4 | 0x2 | 0x1; // All solid //buf[0] = 0x80 | 0x40 | 0x20 | 0x10; // All flashing //buf[0] = 0x80 | 0x00 | 0x20 | 0x10; // All flashing except 3rd light (off) jc->send_subcommand(0x01, 0x30, buf, 1); }
This appears to be the code associated with it, it should be simple to set the lights based off of this code, just use the mem codes and send them to the controllers
from xjoy.
printf("setting LEDs...\n"); for (int r = 0; r < 5; ++r) { for (int i = 0; i < joycons.size(); ++i) { Joycon *jc = &joycons[i]; // Player LED Enable memset(buf, 0x00, 0x40); if (i == 0) { buf[0] = 0x0 | 0x0 | 0x0 | 0x1; // solid 1 } if (i == 1) { if (settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x0 | 0x1; // solid 1 } else if (!settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x2 | 0x0; // solid 2 } } //buf[0] = 0x80 | 0x40 | 0x2 | 0x1; // Flash top two, solid bottom two //buf[0] = 0x8 | 0x4 | 0x2 | 0x1; // All solid //buf[0] = 0x80 | 0x40 | 0x20 | 0x10; // All flashing //buf[0] = 0x80 | 0x00 | 0x20 | 0x10; // All flashing except 3rd light (off) jc->send_subcommand(0x01, 0x30, buf, 1); }
This appears to be the code associated with it, it should be simple to set the lights based off of this code, just use the mem codes and send them to the controllers
make a pull request?
from xjoy.
Hi, this is covered in my pull request, so building the new version from source should set up the LEDs.
from xjoy.
yes, I plan to include that in the next release -- was hoping TOML support would also be done in time, but if another week goes by I'll just cut a release now
from xjoy.
here is prettified format of above code if anyone needs it:
printf("setting LEDs...\n");
for (int r = 0; r < 5; ++r) {
for (int i = 0; i < joycons.size(); ++i) {
Joycon * jc = & joycons[i];
// Player LED Enable memset(buf, 0x00, 0x40);
if (i == 0) {
buf[0] = 0x0 | 0x0 | 0x0 | 0x1;
// solid 1 } if (i == 1) { if (settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x0 | 0x1;
// solid 1 } else if (!settings.combineJoyCons) { buf[0] = 0x0 | 0x0 | 0x2 | 0x0;
// solid 2 } } //buf[0] = 0x80 | 0x40 | 0x2 | 0x1;
// Flash top two, solid bottom two //buf[0] = 0x8 | 0x4 | 0x2 | 0x1;
// All solid //buf[0] = 0x80 | 0x40 | 0x20 | 0x10;
// All flashing //buf[0] = 0x80 | 0x00 | 0x20 | 0x10;
// All flashing except 3rd light (off) jc->send_subcommand(0x01, 0x30, buf, 1);
}
}
}
from xjoy.
Related Issues (20)
- Unable to control anything, does connect HOT 1
- Does this support USB? HOT 2
- Is there a way to turn off the home led ring on version 0.1.8? HOT 1
- Issue Building Solution in Visual Studio 2019 (cant open openvr_api.lib ) HOT 2
- not working
- Doesn't register Joy Cons
- can it support two pairs of joy-cons for one pc? HOT 1
- Xjoy bus not found HOT 2
- my left joycon don't work with xjoy, apparently HOT 7
- Double input on left stick HOT 1
- MSVCP140.dll Not Found And VCRUNTIME140.dll Not Found.
- JoyCon Analog Stick Signal Bounces - Debouncing Needed
- i have made a single left controller fork, what do i do with it? HOT 3
- Crazy left and right stick HOT 1
- the xjoy seems to start lagging when I connect 3+ controllers, but xjoy and another controller seem to be working fine HOT 1
- connection error: bus not found HOT 2
- USB Support possible, what to change? HOT 1
- Left Analog Stick moving on its own when playing Kingdom Hearts 3 on PC HOT 2
- Full analog support not working for 0.2.0 HOT 2
- Multiple inputs with each keystroke
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xjoy.