Skip to content

Commit 3f8c32c

Browse files
brosahayrosahay-silabs
authored andcommitted
Refactor Logging and Clean Up Redundant Code
1 parent a3ef17d commit 3f8c32c

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

examples/platform/silabs/BaseApplication.cpp

+2-12
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ void BaseApplication::DoProvisioningReset()
820820
CHIP_ERROR err = Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow();
821821
if (err != CHIP_NO_ERROR)
822822
{
823-
SILABS_LOG("Failed to open the Basic Commissioning Window");
823+
ChipLogError(AppServer, "Failed to open the Basic Commissioning Window");
824824
}
825825
});
826826
}
@@ -838,7 +838,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
838838
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
839839
if (DIC_OK != dic_init(dic::control::subscribeCB))
840840
{
841-
SILABS_LOG("Failed to initialize DIC module\n");
841+
ChipLogError(AppServer, "dic_init failed");
842842
}
843843
#endif // DIC_ENABLE
844844
break;
@@ -855,16 +855,6 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
855855
default:
856856
break;
857857
}
858-
#ifdef DIC_ENABLE
859-
else if (event->Type == DeviceEventType::kInternetConnectivityChange)
860-
{
861-
VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established);
862-
if (DIC_OK != dic_init(dic::control::subscribeCB))
863-
{
864-
ChipLogDetail(AppServer, "Failed to initialize DIC module");
865-
}
866-
}
867-
#endif // DIC_ENABLE
868858
}
869859

870860
void BaseApplication::OutputQrCode(bool refreshLCD)

examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -306,25 +306,6 @@ void sl_si91x_invoke_btn_press_event()
306306
}
307307
#endif // ENABLE_CHIP_SHELL
308308
}
309-
310-
/******************************************************************
311-
* @fn sl_app_sleep_ready()
312-
* @brief
313-
* Called from the supress ticks from tickless to check if it
314-
* is ok to go to sleep
315-
* @param[in] None
316-
* @return
317-
* None
318-
*********************************************************************/
319-
uint32_t sl_app_sleep_ready()
320-
{
321-
VerifyOrReturnError(wfx_rsi.dev_state & WFX_RSI_ST_SLEEP_READY, false);
322-
#if DISPLAY_ENABLED
323-
// Powering down the LCD
324-
sl_memlcd_power_on(NULL, false);
325-
#endif /* DISPLAY_ENABLED */
326-
return true;
327-
}
328309
#endif // SLI_SI91X_MCU_INTERFACE
329310

330311
/******************************************************************

0 commit comments

Comments
 (0)