Skip to content

Commit

Permalink
Fix app/util/util.h to fix lighting app build (#18811)
Browse files Browse the repository at this point in the history
Currently building lighting app according to README.md fails with:
/home/sag/projects/project-chip/connectedhomeip/examples/lighting-app/esp32/main/DeviceCallbacks.cpp: In member function 'void AppDeviceCallbacks::OnColorControlAttributeChangeCallback(chip::EndpointId, chip::AttributeId, uint8_t*)':
/home/sag/projects/project-chip/connectedhomeip/examples/lighting-app/esp32/main/DeviceCallbacks.cpp:105:9: error: 'emberAfReadServerAttribute' was not declared in this scope
         emberAfReadServerAttribute(endpointId, ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, &saturation,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sag/projects/project-chip/connectedhomeip/examples/lighting-app/esp32/main/DeviceCallbacks.cpp:105:9: note: maximum limit of 1000 namespaces searched for 'emberAfReadServerAttribute'
/home/sag/projects/project-chip/connectedhomeip/examples/lighting-app/esp32/main/DeviceCallbacks.cpp:105:9: note: suggested alternative: 'emberAfIsStringAttributeType'
         emberAfReadServerAttribute(endpointId, ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, &saturation,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         emberAfIsStringAttributeType

Include app/util/util.h to fix the build.
  • Loading branch information
agners authored and pull[bot] committed Oct 10, 2023
1 parent 14f8aff commit 2301803
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/lighting-app/esp32/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "DeviceCallbacks.h"
#include "LEDWidget.h"

#include <app/util/util.h>

static const char * TAG = "light-app-callbacks";

extern LEDWidget AppLED;
Expand Down

0 comments on commit 2301803

Please sign in to comment.