Skip to content

Commit

Permalink
[Silabs] Fix silabs energy mangement app
Browse files Browse the repository at this point in the history
  • Loading branch information
fhbhaiyat authored and mkardous-silabs committed Sep 18, 2024
1 parent 86b7291 commit 1f3b31e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
39 changes: 21 additions & 18 deletions examples/energy-management-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ if (wifi_soc) {
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"../energy-management-common/include",
"${chip_root}/examples/energy-management-app/energy-management-common/common/include",
"${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/include",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/include",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/include",
]

if (use_wf200) {
Expand Down Expand Up @@ -136,23 +139,23 @@ silabs_executable("energy-management-app") {
}

sources = [
"${chip_root}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DEMTestEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseMain.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyReportingEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/FakeReadings.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/PowerTopologyDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/device-energy-management-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/energy-evse-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/energy-evse-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/EnergyReportingEventTriggers.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/PowerTopologyDelegate.cpp",
"${examples_common_plat_dir}/main.cpp",
"src/AppTask.cpp",
]
Expand Down
6 changes: 3 additions & 3 deletions examples/energy-management-app/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#include <platform/CHIPDeviceLayer.h>

#if SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
#include <app/TestEventTriggerDelegate.h>
#include <app/clusters/device-energy-management-server/DeviceEnergyManagementTestEventTriggerHandler.h>
#include <app/clusters/electrical-energy-measurement-server/EnergyReportingTestEventTriggerHandler.h>
Expand Down Expand Up @@ -73,7 +73,7 @@ using namespace ::chip::DeviceLayer::Silabs;
using namespace ::chip::DeviceLayer::Internal;
using namespace chip::TLV;

#if SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
static EnergyEvseTestEventTriggerHandler sEnergyEvseTestEventTriggerHandler;
static EnergyReportingTestEventTriggerHandler sEnergyReportingTestEventTriggerHandler;
static DeviceEnergyManagementTestEventTriggerHandler sDeviceEnergyManagementTestEventTriggerHandler;
Expand Down Expand Up @@ -133,7 +133,7 @@ CHIP_ERROR AppTask::Init()

ApplicationInit();

#if SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
if (Server::GetInstance().GetTestEventTriggerDelegate() != nullptr)
{
Server::GetInstance().GetTestEventTriggerDelegate()->AddHandler(&sEnergyEvseTestEventTriggerHandler);
Expand Down
5 changes: 5 additions & 0 deletions examples/platform/silabs/provision/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ source_set("storage") {
}

deps = [ "${chip_root}/src/lib" ]

public_deps =
[ "${chip_root}/src/platform/silabs/provision:provision-headers" ]

public_configs = [
"${chip_root}/examples/platform/silabs/efr32:test-event-trigger-config",
]
}

0 comments on commit 1f3b31e

Please sign in to comment.