Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 713a1d6

Browse files
committedOct 16, 2024·
fix(matter): add correct guard for ci
1 parent a9a6fc2 commit 713a1d6

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed
 

‎libraries/Matter/src/Matter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
157157
ArduinoMatter Matter;
158158

159-
#endif /* DEVICE_HAS_MATTER */
159+
#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */

‎libraries/Matter/src/Matter.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
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

128
using namespace esp_matter;
139

@@ -36,4 +32,4 @@ class ArduinoMatter {
3632

3733
extern ArduinoMatter Matter;
3834

39-
#endif /* DEVICE_HAS_MATTER */
35+
#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */

‎libraries/Matter/src/MatterEndPoint.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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 */

‎libraries/Matter/src/MatterOnOffLight.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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() {
105105
void MatterOnOffLight::operator=(bool newState) {
106106
setOnOff(newState);
107107
}
108-
#endif /* DEVICE_HAS_MATTER */
108+
#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */

‎libraries/Matter/src/MatterOnOffLight.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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

88
class 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 */

0 commit comments

Comments
 (0)
Please sign in to comment.