someweisguy / esp_dmx

Espressif ESP32 implementation of ANSI-ESTA E1.11 DMX-512A and E1.20 RDM
MIT License
307 stars 30 forks source link

Add PARAMETER_DESCRIPTION and a way to define custom parameters #100

Closed arneboe closed 9 months ago

arneboe commented 9 months ago

Note: This PR is build on top of https://github.com/someweisguy/esp_dmx/pull/93. Therefore the commits from https://github.com/someweisguy/esp_dmx/pull/93 are also part of this PR. Only the last commit belongs to this PR

This pull request adds support for the PARAMETER_DESCRIPTION parameter which is required by the spec when the SUPPORTED_PARAMETERS parameter is supported.

In addition it adds the rdm_register_manufacturer_specific_simple() function. This function can be called by the user to add simple parameters. Simple parameters are all parameters that can be handled by rdm_simple_response_cb. I am not sure if rdm_register_manufacturer_specific_simple() is a good design choice. I added it because I needed a way to test the implementation. An alternative would be to expose rdm_simple_response_cb to the user.

This is the last building block that is missing to support manufacturer specific parameters. Please let me know what you think about this.

A simple example is provided in RDMManufacturerSpecificParameter.ino. The example does not contain any documentation because I want to wait for your comments on this PR before documenting. I will add documentation once you are fine with the implementation.