Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same LED colors for specific devices #187

Open
bruno-machado-ux opened this issue Nov 13, 2021 · 0 comments
Open

Same LED colors for specific devices #187

bruno-machado-ux opened this issue Nov 13, 2021 · 0 comments

Comments

@bruno-machado-ux
Copy link

bruno-machado-ux commented Nov 13, 2021

Hi, not really a issue, more like a feature request.

My nephew really loves the color green. His controller has to shine green, lol. So, when we play on steam, I managed to set the green color for his controller, and it saves. But when leaving Steam Link and returning to my Retropie, it assigns Blue for Controller 1, Red for Controller 2 and Green for Controller 3 on the order of the connected controllers.

Is there a way to save the devices addresses in a way that specific devices always get the same colors?

I tried altering the code on my own, but no dice, as my Python knowledge is really basic and I haven't found a way to properly debug the code. I tried doing the following on "led.py":

class ActionLED(Action):
"Sets the LED color on the device."

def setup(self, device):
    if (device.device_addr == "90:89:5F:28:E6:3E"):
        device.set_led(255, 0, 0)
    elif(device.device_addr == "40:1B:5F:C9:5F:51"):
        device.set_led(0, 255, 0)
    elif(device.device_addr == "A0:AB:51:73:CA:50"):
        device.set_led(255, 234, 0)
    else:
        device.set_led(*self.controller.options.led)

def load_options(self, options):

    if (self.controller.device.device_addr == "90:89:5F:28:E6:3E"):
        self.controller.device.device_addr.set_led(255, 0, 0)
    elif(self.controller.device.device_addr == "40:1B:5F:C9:5F:51"):
        self.controller.device.device_addr.set_led(0, 255, 0)
    elif(self.controller.device.device_addr == "A0:AB:51:73:CA:50"):
        self.controller.device.device_addr.set_led(255, 234, 0)
    else:
        self.controller.device.set_led(*options.led)

Any help would be appreciated! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant