Skip to content

Commit

Permalink
move shell init to light-switch-mgr
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Jan 25, 2023
1 parent ac3bde1 commit c17383b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions examples/light-switch-app/silabs/common/LightSwitchMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include "LightSwitchMgr.h"
#include "BindingHandler.h"

#if defined(ENABLE_CHIP_SHELL)
#include "ShellCommands.h"
#endif // defined(ENABLE_CHIP_SHELL)

#include "AppConfig.h"
#include "AppEvent.h"

Expand Down Expand Up @@ -57,6 +61,10 @@ CHIP_ERROR LightSwitchMgr::Init(EndpointId lightSwitchEndpoint, chip::EndpointId
appError(error);
}

#if defined(ENABLE_CHIP_SHELL)
LightSwtichCommands::RegisterSwitchCommands();
#endif // defined(ENABLE_CHIP_SHELL)

return error;
}

Expand Down
8 changes: 0 additions & 8 deletions examples/light-switch-app/silabs/efr32/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
#endif // QR_CODE_ENABLED
#endif // DISPLAY_ENABLED

#if defined(ENABLE_CHIP_SHELL)
#include "ShellCommands.h"
#endif // defined(ENABLE_CHIP_SHELL)

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app/server/OnboardingCodesUtil.h>
Expand Down Expand Up @@ -178,10 +174,6 @@ CHIP_ERROR AppTask::Init()
appError(err);
}

#if defined(ENABLE_CHIP_SHELL)
LightSwtichCommands::RegisterSwitchCommands();
#endif // defined(ENABLE_CHIP_SHELL)

return err;
}

Expand Down

0 comments on commit c17383b

Please sign in to comment.