Update AppTask.cpp (#36618)
Making the energy-management example more generic
diff --git a/examples/energy-management-app/silabs/src/AppTask.cpp b/examples/energy-management-app/silabs/src/AppTask.cpp
index f5e61f1..340b562 100644
--- a/examples/energy-management-app/silabs/src/AppTask.cpp
+++ b/examples/energy-management-app/silabs/src/AppTask.cpp
@@ -70,7 +70,7 @@
#endif
#define APP_FUNCTION_BUTTON 0
-#define APP_EVSE_SWITCH 1
+#define APP_CONTROL_BUTTON 1
namespace {
@@ -299,7 +299,7 @@
button_event.Type = AppEvent::kEventType_Button;
button_event.ButtonEvent.Action = btnAction;
- if (button == APP_EVSE_SWITCH && btnAction == static_cast<uint8_t>(SilabsPlatform::ButtonAction::ButtonPressed))
+ if (button == APP_CONTROL_BUTTON && btnAction == static_cast<uint8_t>(SilabsPlatform::ButtonAction::ButtonPressed))
{
button_event.Handler = EnergyManagementActionEventHandler;
AppTask::GetAppTask().PostEvent(&button_event);