Skip to content

Commit

Permalink
ModeSelect: Gate inclusion of on-off-server.h based on whether an on-…
Browse files Browse the repository at this point in the history
…off cluster is present in the app (#26263)

* Gate inclusion of on-off-server.h based on whether an on-off cluster is present in the application. Build fails when no on-off cluster is present.

* Need to move the gate so that it's after #include <app/util/config.h> so that the macro gating macro is defined. It seems the headers includes have changed between the version of the file I was using (compnay-internal fork) and the one in master.
  • Loading branch information
eric-ocasio-nxp authored and pull[bot] committed Aug 21, 2023
1 parent 3516e0a commit 6092546
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/clusters/mode-select-server/mode-select-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <app/CommandHandler.h>
#include <app/ConcreteCommandPath.h>
#include <app/clusters/mode-select-server/supported-modes-manager.h>
#include <app/clusters/on-off-server/on-off-server.h>
#include <app/util/af.h>
#include <app/util/attribute-storage.h>
#include <app/util/config.h>
Expand All @@ -34,6 +33,10 @@
#include <lib/support/CodeUtils.h>
#include <platform/DiagnosticDataProvider.h>

#ifdef EMBER_AF_PLUGIN_ON_OFF
#include <app/clusters/on-off-server/on-off-server.h>
#endif // EMBER_AF_PLUGIN_ON_OFF

using namespace std;
using namespace chip;
using namespace chip::app;
Expand Down

0 comments on commit 6092546

Please sign in to comment.