From 0f45b74df649a823a1d2cd79741e770ba069281a Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 20 Nov 2020 21:44:22 +0100 Subject: [PATCH] Temperature app measurement does not build anymore on the esp32 (#3907) --- .../esp32/main/CHIPDeviceManager.cpp | 15 +++++++++------ .../esp32/main/DeviceCallbacks.cpp | 1 + .../esp32/main/component.mk | 2 ++ .../esp32/main/gen/callback.h | 14 -------------- .../esp32/main/main.cpp | 2 +- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp index 8974c1934fc368..a9058345650991 100644 --- a/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp +++ b/examples/temperature-measurement-app/esp32/main/CHIPDeviceManager.cpp @@ -25,11 +25,14 @@ #include #include "CHIPDeviceManager.h" +#include #include #include #include #include +using namespace ::chip; + namespace chip { namespace DeviceManager { @@ -92,16 +95,16 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) exit: return err; } +} // namespace DeviceManager +} // namespace chip -void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, +void emberAfPostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size, uint8_t * value) { - CHIPDeviceManagerCallbacks * cb = CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); + chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = + chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); if (cb != nullptr) { - cb->PostAttributeChangeCallback(endpoint, clusterId, attributeId, mask, manufacturerCode, type, size, value); + cb->PostAttributeChangeCallback(endpointId, clusterId, attributeId, mask, manufacturerCode, type, size, value); } } - -} // namespace DeviceManager -} // namespace chip diff --git a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp index 1a8ef0728974ee..c232b7e4ec5c63 100644 --- a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp @@ -32,6 +32,7 @@ static const char * TAG = "echo-devicecallbacks"; +using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; using namespace ::chip::DeviceLayer; diff --git a/examples/temperature-measurement-app/esp32/main/component.mk b/examples/temperature-measurement-app/esp32/main/component.mk index a1fa47a35339f0..9762d2b50b1e47 100644 --- a/examples/temperature-measurement-app/esp32/main/component.mk +++ b/examples/temperature-measurement-app/esp32/main/component.mk @@ -26,11 +26,13 @@ COMPONENT_SRCDIRS := gen \ ../third_party/connectedhomeip/examples/common/chip-app-server \ ../third_party/connectedhomeip/src/app/util \ + ../third_party/connectedhomeip/src/app/reporting \ ../third_party/connectedhomeip/src/app/clusters/basic \ ../third_party/connectedhomeip/src/app/clusters/temperature-measurement-server \ COMPONENT_EXTRA_INCLUDES := $(PROJECT_PATH)/third_party/connectedhomeip/src/app/util \ + $(PROJECT_PATH)/third_party/connectedhomeip/src/app/reporting \ $(PROJECT_PATH)/third_party/connectedhomeip/examples/common/chip-app-server/include \ $(PROJECT_PATH)/third_party/connectedhomeip/src diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index 366439573e6e24..9644fced7ffe03 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -31,10 +31,6 @@ //#include "hal/hal.h" -#ifdef __cplusplus -extern "C" { -#endif // #ifdef __cplusplus - /** @name Non-Cluster Related Callbacks */ // @{ /** @brief Add To Current App Tasks @@ -109,13 +105,6 @@ bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::Cluster */ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, chip::AttributeId attributeId); -/** @brief Clear Report Table - * - * This function is called by the framework when the application should clear - * the report table. - * - */ -EmberStatus emberAfClearReportTableCallback(void); /** @brief Cluster Init * * This function is called when a specific cluster is initialized. It gives the @@ -23446,8 +23435,5 @@ void halSleepCallback(bool enter, SleepModes sleepMode); /** @} END HAL Library Plugin Callbacks */ /** @} END addtogroup */ -#ifdef __cplusplus -} -#endif // #ifdef __cplusplus #endif // SILABS_EMBER_AF_CALLBACK_PROTOTYPES diff --git a/examples/temperature-measurement-app/esp32/main/main.cpp b/examples/temperature-measurement-app/esp32/main/main.cpp index 65926b8f2a776b..af940f026c2234 100644 --- a/examples/temperature-measurement-app/esp32/main/main.cpp +++ b/examples/temperature-measurement-app/esp32/main/main.cpp @@ -47,7 +47,7 @@ using namespace ::chip::DeviceLayer; // Used to indicate that an IP address has been added to the QRCode #define EXAMPLE_VENDOR_TAG_IP 1 -extern void PairingComplete(SecurePairingSession * pairing); +extern void PairingComplete(NodeId assignedNodeId, NodeId peerNodeId, SecurePairingSession * pairing); const char * TAG = "temperature-measurement-app";