Skip to content

Commit

Permalink
[nrfconnect] set Thread device type in examples (#4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuDuda authored Jan 26, 2021
1 parent 21d119b commit f11be21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/lighting-app/nrfconnect/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ int main(void)
LOG_ERR("ThreadStackMgr().InitThreadStack() failed");
goto exit;
}

ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice);
if (ret != CHIP_NO_ERROR)
{
LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed");
goto exit;
}
#endif

ret = GetAppTask().StartApp();
Expand Down
7 changes: 7 additions & 0 deletions examples/lock-app/nrfconnect/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ int main()
LOG_ERR("ThreadStackMgr().InitThreadStack() failed");
goto exit;
}

ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice);
if (ret != CHIP_NO_ERROR)
{
LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed");
goto exit;
}
#endif

ret = GetAppTask().StartApp();
Expand Down

0 comments on commit f11be21

Please sign in to comment.