From 36871989c628bd8ade35ddaed5ae2e51786d9d39 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Fri, 27 Jan 2023 12:42:33 -0500 Subject: [PATCH] silabs_fix_lighting_app_lcd (#24661) --- .../lighting-app/silabs/efr32/src/AppTask.cpp | 15 +++++++++++++++ examples/lock-app/silabs/efr32/src/AppTask.cpp | 15 +++++++++++++++ .../platform/silabs/efr32/BaseApplication.cpp | 0 3 files changed, 30 insertions(+) mode change 100644 => 100755 examples/lighting-app/silabs/efr32/src/AppTask.cpp mode change 100644 => 100755 examples/platform/silabs/efr32/BaseApplication.cpp diff --git a/examples/lighting-app/silabs/efr32/src/AppTask.cpp b/examples/lighting-app/silabs/efr32/src/AppTask.cpp old mode 100644 new mode 100755 index b638a93bec8723..458ae51d797865 --- a/examples/lighting-app/silabs/efr32/src/AppTask.cpp +++ b/examples/lighting-app/silabs/efr32/src/AppTask.cpp @@ -164,6 +164,21 @@ CHIP_ERROR AppTask::Init() sLightLED.Set(LightMgr().IsLightOn()); #endif // ENABLE_WSTK_LEDS +// Update the LCD with the Stored value. Show QR Code if not provisioned +#ifdef DISPLAY_ENABLED + GetLCD().WriteDemoUI(LightMgr().IsLightOn()); +#ifdef QR_CODE_ENABLED +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + GetLCD().ShowQRCode(true, true); + } +#endif // QR_CODE_ENABLED +#endif + return err; } diff --git a/examples/lock-app/silabs/efr32/src/AppTask.cpp b/examples/lock-app/silabs/efr32/src/AppTask.cpp index 241c49319fa01b..142991bbe5be3e 100644 --- a/examples/lock-app/silabs/efr32/src/AppTask.cpp +++ b/examples/lock-app/silabs/efr32/src/AppTask.cpp @@ -252,6 +252,21 @@ CHIP_ERROR AppTask::Init() sLockLED.Set(state.Value() == DlLockState::kUnlocked); #endif // ENABLE_WSTK_LEDS + // Update the LCD with the Stored value. Show QR Code if not provisioned +#ifdef DISPLAY_ENABLED + GetLCD().WriteDemoUI(state.Value() != DlLockState::kUnlocked); +#ifdef QR_CODE_ENABLED +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + GetLCD().ShowQRCode(true, true); + } +#endif // QR_CODE_ENABLED +#endif + chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast(nullptr)); ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp old mode 100644 new mode 100755