Skip to content

Commit

Permalink
Fix raspi startup of tv-casting-app (#17707)
Browse files Browse the repository at this point in the history
* Change init order

* address feedback
  • Loading branch information
chrisdecenzo authored and pull[bot] committed Feb 27, 2024
1 parent fe90b6a commit fb903d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/tv-casting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,17 +678,16 @@ LinuxCommissionableDataProvider gCommissionableDataProvider;

int main(int argc, char * argv[])
{
VerifyOrDie(CHIP_NO_ERROR == chip::Platform::MemoryInit());
VerifyOrDie(CHIP_NO_ERROR == chip::DeviceLayer::PlatformMgr().InitChipStack());

#if defined(ENABLE_CHIP_SHELL)
Engine::Root().Init();
std::thread shellThread([]() { Engine::Root().RunMainLoop(); });
Shell::RegisterCastingCommands();
#endif

CHIP_ERROR err = CHIP_NO_ERROR;

SuccessOrExit(err = chip::Platform::MemoryInit());
SuccessOrExit(err = chip::DeviceLayer::PlatformMgr().InitChipStack());

// Init the commissionable data provider based on command line options
// to handle custom verifiers, discriminators, etc.
err = InitCommissionableDataProvider(gCommissionableDataProvider, LinuxDeviceOptions::GetInstance());
Expand Down

0 comments on commit fb903d9

Please sign in to comment.