Skip to content

Commit 1f3541d

Browse files
[Silabs] Matter Shell fixing for the Silabs devices (project-chip#40197)
* Shell fixing for the silabs devices * removing the namespaces
1 parent 8560821 commit 1f3541d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/refrigerator-app/silabs/src/EventHandlerLibShell.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ constexpr uint8_t kRefEndpointId = 1;
2828

2929
using namespace chip;
3030
using namespace chip::app;
31-
using namespace Clusters::RefrigeratorAlarm;
32-
using namespace Clusters::TemperatureControl;
31+
using namespace chip::app::Clusters;
3332
using Shell::Engine;
3433
using Shell::shell_command_t;
3534
using Shell::streamer_get;
@@ -113,7 +112,7 @@ CHIP_ERROR RefrigeratorDoorEventHandler(int argc, char ** argv)
113112
int value = std::stoi(argv[0]); // Safe to use now, as we validated the input earlier
114113

115114
RefrigeratorAlarmEventData * data = Platform::New<RefrigeratorAlarmEventData>();
116-
data->eventId = Events::Notify::Id;
115+
data->eventId = RefrigeratorAlarm::Events::Notify::Id;
117116
data->doorState = static_cast<AlarmBitmap>(value);
118117

119118
DeviceLayer::PlatformMgr().ScheduleWork(EventWorkerFunction, reinterpret_cast<intptr_t>(data));
@@ -163,7 +162,7 @@ void EventWorkerFunction(intptr_t context)
163162

164163
switch (data->eventId)
165164
{
166-
case Events::Notify::Id: {
165+
case RefrigeratorAlarm::Events::Notify::Id: {
167166
RefrigeratorAlarmEventData * alarmData = reinterpret_cast<RefrigeratorAlarmEventData *>(context);
168167
RefrigeratorAlarmServer::Instance().SetStateValue(kRefEndpointId, alarmData->doorState);
169168
break;

src/platform/silabs/SiWx917/SiWxPlatformInterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <app/icd/server/ICDServerConfig.h>
2121

2222
namespace {
23-
#ifdef ENABLE_CHIP_SHELL
23+
#if defined(ENABLE_CHIP_SHELL) && CHIP_CONFIG_ENABLE_ICD_SERVER
2424
bool ps_requirement_added = false;
25-
#endif // ENABLE_CHIP_SHELL
25+
#endif // ENABLE_CHIP_SHELL && CHIP_CONFIG_ENABLE_ICD_SERVER
2626
} // namespace
2727

2828
#ifdef __cplusplus

0 commit comments

Comments
 (0)