replace usage of EMBER_AF_* with namespaced names from app_common and

fix compilation failures in zap_light
This commit is contained in:
Shubham Patil
2023-12-20 17:20:34 +05:30
parent efe0f2bf9b
commit 22ac07f718
4 changed files with 9 additions and 6 deletions
@@ -323,7 +323,7 @@ esp_err_t app_driver_light_set_defaults(uint16_t endpoint_id)
cluster = cluster::get(endpoint, ColorControl::Id);
attribute = attribute::get(cluster, ColorControl::Attributes::ColorMode::Id);
attribute::get_val(attribute, &val);
if (val.val.u8 == EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION) {
if (val.val.u8 == (uint8_t)ColorControl::ColorMode::kCurrentHueAndCurrentSaturation) {
/* Setting hue */
attribute = attribute::get(cluster, ColorControl::Attributes::CurrentHue::Id);
attribute::get_val(attribute, &val);
@@ -332,7 +332,7 @@ esp_err_t app_driver_light_set_defaults(uint16_t endpoint_id)
attribute = attribute::get(cluster, ColorControl::Attributes::CurrentSaturation::Id);
attribute::get_val(attribute, &val);
err |= app_driver_light_set_saturation(handle, &val);
} else if (val.val.u8 == EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE) {
} else if (val.val.u8 == (uint8_t)ColorControl::ColorMode::kColorTemperature) {
/* Setting temperature */
attribute = attribute::get(cluster, ColorControl::Attributes::ColorTemperatureMireds::Id);
attribute::get_val(attribute, &val);
@@ -115,8 +115,8 @@ extern "C" void app_main()
light_config.on_off.lighting.start_up_on_off = nullptr;
light_config.level_control.current_level = DEFAULT_BRIGHTNESS;
light_config.level_control.lighting.start_up_current_level = DEFAULT_BRIGHTNESS;
light_config.color_control.color_mode = EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE;
light_config.color_control.enhanced_color_mode = EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE;
light_config.color_control.color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature;
light_config.color_control.enhanced_color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature;
light_config.color_control.color_temperature.startup_color_temperature_mireds = nullptr;
endpoint_t *endpoint = color_temperature_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle);
if (!endpoint) {
+3
View File
@@ -73,3 +73,6 @@ idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_FAN_CONTROL_CLUSTER_SERVE
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_DISHWASHER_ALARM_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_CONTENT_APP_OBSERVER_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_CONTENT_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-DEMBER_AF_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT=1" APPEND)
+2 -2
View File
@@ -119,7 +119,7 @@ esp_err_t app_driver_light_set_defaults(uint16_t endpoint_id)
cluster_id = ColorControl::Id;
attribute_id = ColorControl::Attributes::CurrentHue::Id;
attribute::get_val_raw(endpoint_id, cluster_id, attribute_id, &value, sizeof(uint8_t));
if (value == EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION) {
if (value == (uint8_t)ColorControl::ColorMode::kCurrentHueAndCurrentSaturation) {
/* Setting hue */
attribute_id = ColorControl::Attributes::CurrentHue::Id;
attribute::get_val_raw(endpoint_id, cluster_id, attribute_id, &value, sizeof(uint8_t));
@@ -130,7 +130,7 @@ esp_err_t app_driver_light_set_defaults(uint16_t endpoint_id)
attribute::get_val_raw(endpoint_id, cluster_id, attribute_id, &value, sizeof(uint8_t));
val = esp_matter_uint8(value);
err |= app_driver_light_set_saturation(handle, &val);
} else if (value == EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE) {
} else if (value == (uint8_t)ColorControl::ColorMode::kColorTemperature) {
/* Setting temperature */
attribute_id = ColorControl::Attributes::ColorTemperatureMireds::Id;
attribute::get_val_raw(endpoint_id, cluster_id, attribute_id, (uint8_t *)&value_u16, sizeof(uint16_t));