diff --git a/examples/thermostat/silabs/src/ZclCallbacks.cpp b/examples/thermostat/silabs/src/ZclCallbacks.cpp index 734637d91be401..641f4c7698c27d 100644 --- a/examples/thermostat/silabs/src/ZclCallbacks.cpp +++ b/examples/thermostat/silabs/src/ZclCallbacks.cpp @@ -28,6 +28,10 @@ #include #include +#ifdef DIC_ENABLE +#include "dic_control.h" +#endif // DIC_ENABLE + using namespace ::chip; using namespace ::chip::app::Clusters; @@ -46,5 +50,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & else if (clusterId == Thermostat::Id) { TempMgr().AttributeChangeHandler(attributePath.mEndpointId, attributeId, value, size); +#ifdef DIC_ENABLE + dic::control::AttributeHandler(attributePath.mEndpointId, attributeId); +#endif // DIC_ENABLE } } diff --git a/examples/window-app/silabs/src/WindowManager.cpp b/examples/window-app/silabs/src/WindowManager.cpp index c6687ab2ba512e..851a818e9ec485 100644 --- a/examples/window-app/silabs/src/WindowManager.cpp +++ b/examples/window-app/silabs/src/WindowManager.cpp @@ -56,6 +56,12 @@ using namespace ::chip::DeviceLayer::Silabs; #define APP_STATE_LED 0 #define APP_ACTION_LED 1 +#ifdef DIC_ENABLE +#define DECIMAL 10 +#define MSG_SIZE 6 +#include "dic.h" +#endif // DIC_ENABLE + using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace chip::app::Clusters::WindowCovering; @@ -502,10 +508,25 @@ void WindowManager::Cover::CallbackPositionSet(intptr_t arg) position.SetNonNull(data->percent100ths); if (data->isTilt) + { TiltPositionSet(data->mEndpointId, position); +#ifdef DIC_ENABLE + uint16_t value = data->percent100ths; + char buffer[MSG_SIZE]; + itoa(value, buffer, DECIMAL); + dic_sendmsg("tilt/position set", (const char *) (buffer)); +#endif // DIC_ENABLE + } else + { LiftPositionSet(data->mEndpointId, position); - +#ifdef DIC_ENABLE + uint16_t value = data->percent100ths; + char buffer[MSG_SIZE]; + itoa(value, buffer, DECIMAL); + dic_sendmsg("lift/position set", (const char *) (buffer)); +#endif // DIC_ENABLE + } chip::Platform::Delete(data); }