Skip to content

Fix custom range controls dropping extended command arguments - #429

Merged
Cipulot merged 1 commit into
mainfrom
fix-slider
Jul 21, 2026
Merged

Fix custom range controls dropping extended command arguments#429
Cipulot merged 1 commit into
mainfrom
fix-slider

Conversation

@Cipulot

@Cipulot Cipulot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserve all custom-menu command arguments when updating range controls.

The range update path previously extracted only the channel and command ID, dropping additional command arguments such as a layer or item index.

For a control defined as:

["id_custom_slider_id", 0, 2, 4]

changing its value to 7 incorrectly sent:

channel=0, command=2, value=7

instead of:

channel=0, command=2, layer=4, value=7

Firmware expecting the extended argument could therefore update the wrong setting or interpret the value as an index.

Fix

Range SET commands now:

  1. Remove only the UI identifier.
  2. Preserve every remaining command argument.
  3. Append the encoded one-byte or multi-byte value.

Tests

Added regression coverage confirming that:

  • Additional command parameters are preserved for one-byte range values.
  • Additional command parameters are preserved for multi-byte range values.

Verification

  • npm test
  • npx tsc --noEmit
  • Prettier check

@Cipulot
Cipulot merged commit 077304f into main Jul 21, 2026
1 check passed
@Cipulot
Cipulot deleted the fix-slider branch July 21, 2026 20:40
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

Successfully merging this pull request may close these issues.

1 participant