Skip to content

Commit

Permalink
Try to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmelveilleux committed Dec 22, 2023
1 parent 5ab306f commit 6a19e1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ template("chip_data_model") {
"${_app_root}/clusters/${cluster}/TimeSyncDataProvider.cpp",
]
defines +=
[ "TIME_SYNC_ENABLE_TSC_FEATURE=${time_sync_enable_tsc_feature}" ]
[ "TIME_SYNC_ENABLE_TSC_FEATURE=${time_sync_enable_tsc_feature}",
"TIME_SYNCHRONIZATION_CLUSTER_INCLUDED=1"
]
} else if (cluster == "scenes-server") {
sources += [
"${_app_root}/clusters/${cluster}/${cluster}.cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

#include "general-diagnostics-server.h"

#ifdef ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER
#ifdef TIME_SYNCHRONIZATION_CLUSTER_INCLUDED
#include "app/clusters/time-synchronization-server/time-synchronization-server.h"
#endif // ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER
#endif // TIME_SYNCHRONIZATION_CLUSTER_INCLUDED

#include "app/server/Server.h"
#include <app-common/zap-generated/attributes/Accessors.h>
Expand Down Expand Up @@ -398,6 +398,7 @@ bool emberAfGeneralDiagnosticsClusterTimeSnapshotCallback(CommandHandler * comma

System::Clock::Microseconds64 posix_time_us{ 0 };

#ifdef TIME_SYNCHRONIZATION_CLUSTER_INCLUDED
#ifdef ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER
bool time_is_synced = false;
using Clusters::TimeSynchronization::GranularityEnum;
Expand All @@ -414,7 +415,9 @@ bool emberAfGeneralDiagnosticsClusterTimeSnapshotCallback(CommandHandler * comma
posix_time_us = System::Clock::Microseconds64{ 0 };
}
}
#endif // TIME_SYNCHRONIZATION_CLUSTER
#endif // ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER
#endif // TIME_SYNCHRONIZATION_CLUSTER_INCLUDED

System::Clock::Milliseconds64 system_time_ms =
std::chrono::duration_cast<System::Clock::Milliseconds64>(Server::GetInstance().TimeSinceInit());

Expand Down

0 comments on commit 6a19e1e

Please sign in to comment.