Skip to content

Commit

Permalink
[Silabs] Fixing the switch ladder and removing warning flags (#35366)
Browse files Browse the repository at this point in the history
* fixing the switch ladder and removing warning flags

* Restyled by clang-format

* adding unused parameter cflag due to wifi sdk

* Restyled by gn

* adding the correct warning options

* updating the warning flag and only deleting fabrics for wifi

* adding the remove services to get rid of the matter multicast service

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 22, 2024
1 parent f0ecf58 commit 1253581
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
20 changes: 14 additions & 6 deletions examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ void BaseApplication::ScheduleFactoryReset()
{
Provision::Manager::GetInstance().SetProvisionRequired(true);
}
#if SL_WIFI
// Removing the matter services on factory reset
chip::Dnssd::ServiceAdvertiser::Instance().RemoveServices();
#endif
PlatformMgr().HandleServerShuttingDown(); // HandleServerShuttingDown calls OnShutdown() which is only implemented for the
// basic information cluster it seems. And triggers and Event flush, which is not
// relevant when there are no fabrics left
Expand Down Expand Up @@ -851,19 +855,23 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
case DeviceEventType::kThreadConnectivityChange:
case DeviceEventType::kInternetConnectivityChange: {
#ifdef DIC_ENABLE
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
if (DIC_OK != dic_init(dic::control::subscribeCB))
if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established)
{
ChipLogError(AppServer, "dic_init failed");
if (DIC_OK != dic_init(dic::control::subscribeCB))
{
ChipLogError(AppServer, "dic_init failed");
}
}
#endif // DIC_ENABLE
#ifdef DISPLAY_ENABLED
SilabsLCD::Screen_e screen;
AppTask::GetLCD().GetScreen(screen);
// Update the LCD screen with SSID and connected state
VerifyOrReturn(screen == SilabsLCD::Screen_e::StatusScreen);
BaseApplication::UpdateLCDStatusScreen(false);
AppTask::GetLCD().SetScreen(screen);
if (screen == SilabsLCD::Screen_e::StatusScreen)
{
BaseApplication::UpdateLCDStatusScreen(false);
AppTask::GetLCD().SetScreen(screen);
}
#endif // DISPLAY_ENABLED
if ((event->ThreadConnectivityChange.Result == kConnectivity_Established) ||
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established))
Expand Down
7 changes: 0 additions & 7 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,9 @@ template("siwx917_sdk") {
libs += [ "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a" ]

cflags += [
"-Wno-maybe-uninitialized",
"-Wno-shadow",
"-Wno-empty-body",
"-Wno-cpp",
"-Wno-missing-braces",
"-Wno-sign-compare",
"-Wno-error",
"-Wno-unknown-warning-option",
"-Wno-unused-variable",
"-Wno-unused-function",
]

foreach(include_dir, _include_dirs) {
Expand Down

0 comments on commit 1253581

Please sign in to comment.