Lock LED Output Settings?

I’ve created a custom WLED board (ESP32) with 6 fixed led outputs. I can assign those output pins in my platformio_override with the DATA_PINS define. But, being fixed to the board, there is no need for an end user to add new outputs or change the output pin values. Is there any way to lock the LED output values so the end user can’t change the pin numbers?

I understand the user will need to modify other output values like type, order, length, etc. but changing GPIO pin values is useless and I want to prevent the user from making changes that could render their led strips useless.

I’d guess you’re looking at a custom version that either doesn’t show the GPIO settings or at worst, simply doesn’t use them.

Someone more comfortable with the guts of the code can probably chime in with the relevant section (or you might already have an idea yourself)…

After some exploration, my solution was to modify the settings_leds.htm file (which requires rebuilding the html with npm, see this).

I did the following:

  1. Disabled the GPIO fields so they couldn’t be modified by the user. I also added a warning field underneath it to inform the user the pins couldn’t be modified.
  2. I changed the onClick callback for the + and - output buttons to display a popup stating that the led outputs for this board are fixed and can’t be changed.
  3. Because my last LED Output is actually a single on board pixel for some advanced status updates, I locked the length field and type field for that output only so it couldn’t be modified.
  4. I changed the number labels of each output from “1:” to “Strip #1:”, etc. The final and 6th output, the on board status pixel, is labeled “Status LED:”

My goal was to keep all of the UI elements still present, so the UI is recognizable to the user. But offer explicit information (warning tags or popups) as to why certain settings couldn’t be changed.