How to get/set another RDM parameters?
Hi @someweisguy Thank you for your awesome library.
I am using this library and everything works super fine. I'd like to get/set some specific RDM parameters, which is not defined on your example code. For ex)
- RDM_PID_SENSOR_DEFINITION
- RDM_PID_SENSOR_VALUE
- RDM_PID_POWER_STATE
- RDM_PID_DEVICE_HOURS
Those parameters are mentioned as 'supported' on the list of https://github.com/someweisguy/esp_dmx/tree/release/v4.1?tab=readme-ov-file#parameter-ids
And I also found some address setup for them in esp_dmx/src/rdm/include/types.h as well.
But I couldn't figure out how I can send the request to get / set those parameters. Do you already build the functions for them or plan to build in future soon?
Thank you very much in advance.
The Arduino_RDMSensor example covers the first 2 PIDs, but as you can see in my issue (#173), it fails in the function rdm_sensor_definition_add. I wish I could tell you more, but I'm still debugging it for my work project.
I got Sensors and PID workign reliably
- In sensor_parameter.c, in rdm_sensor_definition_add(), change to ‘if (sensor_defs[definition->num].num == 0xff) {‘
- Remove all the assert in parameters.c
- Remove all the assert in service.c
- in , rdm_sensor_get_count(), change return sensors->sensor_count -1;
- for lamp hours , copy the PID protrction from devide hours to stop users changing settings:
#ifdef CONFIG_RDM_PID_LAMP_HOURS_DISABLE_SET
.pid_cc = RDM_CC_GET,
#else
.pid_cc = RDM_CC_GET_SET,
#endif
Code for the Sensor / PID:
` if (!rdm_register_device_hours(dmx_num, callback, context)) { ESP_LOGE(TAG, "unable to register device hours"); } else { ESP_LOGI(TAG, "--> Register device hours"); } if (!rdm_register_lamp_hours(dmx_num, callback, context)) { ESP_LOGE(TAG, "unable to register lamp hours"); } else { ESP_LOGI(TAG, "--> Register lamp hours"); }
uint32_t lamp_hours = 4;
uint32_t device_hours = 7;
rdm_set_lamp_hours(dmx_num, lamp_hours);
rdm_set_device_hours(dmx_num, device_hours);
`