Hey there, Mahuti,
I've been offline for a bit, but was just getting up to speed with where you're at. Any update?
If you're still looking for a bit of feedback on how to handle p1 vs p2 vs p3 vs p4, etc. Here's a real-world example of what I'm looking to do with my control panel. I'm about a week out on starting all my wiring and configuring. I get my artwork this week, will glue all that down (found a local print-shop that will give it a nice lexan type laminate without much extra cost, so I can skip the night mare of cutting and trimming plexiglass!!! HOORAY!), anyways, here's a jpg of what my color configuration's going to be (attached to this post).
Not sure if that's what you were really looking for, but what I plan on is using single color LED's, but having multiple buttons/diff color LED's for P1 button 1 (upper and lower controls on my layout, in case that's not obvious). I'll have a 8-way P1 joystick and on the top, I have a 4 way P1 joystick. I'd want both button 1's to light up, but with different colors. So, all I really need is an "on/off" signal, not a voltage setting by color, like it sounds like you were hardcoding.
I've got too many LED's and only one LED-WIZ, so I'm not doing RGB LED's, etc..
Anyways, I'd love to get an update of where you app is at. I'll be downloading whatever you've got by the end of next week and let you know where I end up with it.