File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1- #include < Matter .h>
2- #if DEVICE_HAS_MATTER
1+ #include < sdkconfig .h>
2+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
33
4- #include < Arduino .h>
4+ #include < Matter .h>
55#include < app/server/Server.h>
66#include " MatterEndPoint.h"
77
@@ -156,4 +156,4 @@ void ArduinoMatter::decommission() {
156156// Global Matter Object
157157ArduinoMatter Matter;
158158
159- #endif /* DEVICE_HAS_MATTER */
159+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 11#pragma once
2+ #include < sdkconfig.h>
3+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
4+
25#include < Arduino.h>
36#include < esp_matter.h>
4- #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION || CHIP_DEVICE_CONFIG_ENABLE_THREAD
5- #define DEVICE_HAS_MATTER 1
6- #else
7- #define DEVICE_HAS_MATTER 0
8- #endif
9-
10- #if DEVICE_HAS_MATTER
117
128using namespace esp_matter ;
139
@@ -36,4 +32,4 @@ class ArduinoMatter {
3632
3733extern ArduinoMatter Matter;
3834
39- #endif /* DEVICE_HAS_MATTER */
35+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 11#pragma once
2+ #include < sdkconfig.h>
3+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
24
35#include < Matter.h>
4- #if DEVICE_HAS_MATTER
5-
66#include < functional>
77
88// Matter Endpoint Base Class. Controls the endpoint ID and allows the child class to overwrite attribute change call
@@ -20,4 +20,4 @@ class MatterEndPoint {
2020 protected:
2121 uint16_t endpoint_id = 0 ;
2222};
23- #endif /* DEVICE_HAS_MATTER */
23+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 1- #include < Matter .h>
2- #if DEVICE_HAS_MATTER
1+ #include < sdkconfig .h>
2+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
33
4- #include < Arduino .h>
4+ #include < Matter .h>
55#include < app/server/Server.h>
66#include < MatterOnOffLight.h>
77
@@ -105,4 +105,4 @@ MatterOnOffLight::operator bool() {
105105void MatterOnOffLight::operator =(bool newState) {
106106 setOnOff (newState);
107107}
108- #endif /* DEVICE_HAS_MATTER */
108+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
Original file line number Diff line number Diff line change 11#pragma once
2+ #include < sdkconfig.h>
3+ #ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL
24
35#include < Matter.h>
4- #if DEVICE_HAS_MATTER
5-
66#include < MatterEndPoint.h>
77
88class MatterOnOffLight : public MatterEndPoint {
@@ -31,4 +31,4 @@ class MatterOnOffLight : public MatterEndPoint {
3131 bool state = false ; // default initial state is off, but it can be changed by begin(bool)
3232 EndPointCB _onChangeCB = NULL ;
3333};
34- #endif /* DEVICE_HAS_MATTER */
34+ #endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
You can’t perform that action at this time.
0 commit comments