nirenjan / libx52

Saitek X52/X52pro drivers & controller mapping software for Linux
https://nirenjan.github.io/libx52
GNU General Public License v2.0
115 stars 14 forks source link

support for setting multiple leds at once #48

Closed MNS26 closed 1 year ago

MNS26 commented 1 year ago

having the ability to set multiple led's at once would be a great feature (idk how else to put it) example:

x52cli led A B D E I amber

EDIT: i found a workaround for my needs

function LEDcolor(){
    for(var i=0; i<arguments.length-1;i++)//dont loop over last one... thats the color
    {
    msg.payload= "led ".concat(arguments[i]," ",arguments[arguments.length-1])
    node.send(msg);
    }
}

im using node-red to read the game's status and depending on it change the led's... that code snippet just takes X variables as long as the last one is a state (on,off,red,amber,green)

nirenjan commented 1 year ago

The way x52cli is written, it is very rigid on the parameter processing. I would have to completely rewrite the program in order to implement this enhancement.