File tree 2 files changed +28
-1
lines changed
examples/closure-app/silabs
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ import("${chip_root}/src/platform/silabs/wifi/args.gni")
19
19
20
20
sl_enable_test_event_trigger = false
21
21
chip_enable_ota_requestor = false
22
- disable_lcd = true
22
+ disable_lcd = false
23
23
app_data_model = " ${ chip_root } /examples/closure-app/closure-common"
Original file line number Diff line number Diff line change 21
21
#include " AppConfig.h"
22
22
#include " AppEvent.h"
23
23
#include " LEDWidget.h"
24
+
25
+ #ifdef DISPLAY_ENABLED
26
+ #include " lcd.h"
27
+ #ifdef QR_CODE_ENABLED
28
+ #include " qrcodegen.h"
29
+ #endif // QR_CODE_ENABLED
30
+ #endif // DISPLAY_ENABLED
31
+
24
32
#include < ClosureAppCommonMain.h>
25
33
#include < app-common/zap-generated/cluster-enums.h>
26
34
#include < app-common/zap-generated/cluster-objects.h>
@@ -100,6 +108,10 @@ CHIP_ERROR AppTask::Init()
100
108
CHIP_ERROR err = CHIP_NO_ERROR;
101
109
chip::DeviceLayer::Silabs::GetPlatform ().SetButtonsCb (AppTask::ButtonEventHandler);
102
110
111
+ #ifdef DISPLAY_ENABLED
112
+ GetLCD ().Init ((uint8_t *) " Closure-App" );
113
+ #endif
114
+
103
115
err = BaseApplication::Init ();
104
116
if (err != CHIP_NO_ERROR)
105
117
{
@@ -109,6 +121,21 @@ CHIP_ERROR AppTask::Init()
109
121
110
122
ApplicationInit ();
111
123
124
+ // Update the LCD with the Stored value. Show QR Code if not provisioned
125
+ #ifdef DISPLAY_ENABLED
126
+ GetLCD ().WriteDemoUI (false );
127
+ #ifdef QR_CODE_ENABLED
128
+ #ifdef SL_WIFI
129
+ if (!ConnectivityMgr ().IsWiFiStationProvisioned ())
130
+ #else
131
+ if (!ConnectivityMgr ().IsThreadProvisioned ())
132
+ #endif /* !SL_WIFI */
133
+ {
134
+ GetLCD ().ShowQRCode (true );
135
+ }
136
+ #endif // QR_CODE_ENABLED
137
+ #endif
138
+
112
139
return err;
113
140
}
114
141
You can’t perform that action at this time.
0 commit comments