From d4603529f4b0117bd0677f85957672bee7ceb4c4 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Thu, 25 Aug 2022 13:26:02 -0400 Subject: [PATCH] Fix efr32-brd4161a-lock-rpc build Fix the conditional compilation in the EFR32 sources to match their headers. This avoids the following compilation errors: 2022-08-25 13:26:54 INFO ../../examples/lock-app/efr32/third_party/connectedhomeip/examples/platform/efr32/display/lcd.cpp: In member function 'void SilabsLCD::WriteDemoUI(bool)': 2022-08-25 13:26:54 INFO ../../examples/lock-app/efr32/third_party/connectedhomeip/examples/platform/efr32/display/lcd.cpp:125:9: error: 'mShowQRCode' was not declared in this scope 2022-08-25 13:26:54 INFO 125 | if (mShowQRCode) 2022-08-25 13:26:54 INFO | ^~~~~~~~~~~ 2022-08-25 13:26:54 INFO At global scope: 2022-08-25 13:26:54 INFO cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics 2022-08-25 13:27:57 INFO ../../examples/lock-app/efr32/third_party/connectedhomeip/examples/platform/efr32/BaseApplication.cpp: In static member function 'static void BaseApplication::ButtonHandler(AppEvent*)': 2022-08-25 13:27:57 INFO ../../examples/lock-app/efr32/third_party/connectedhomeip/examples/platform/efr32/BaseApplication.cpp:396:19: error: 'class SilabsLCD' has no member named 'ToggleQRCode' 2022-08-25 13:27:57 INFO 396 | slLCD.ToggleQRCode(); 2022-08-25 13:27:57 INFO | ^~~~~~~~~~~~ 2022-08-25 13:27:57 INFO At global scope: --- examples/platform/efr32/BaseApplication.cpp | 2 +- examples/platform/efr32/display/lcd.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/platform/efr32/BaseApplication.cpp b/examples/platform/efr32/BaseApplication.cpp index 66d8cbc0a4efa5..a158c9a687fa99 100644 --- a/examples/platform/efr32/BaseApplication.cpp +++ b/examples/platform/efr32/BaseApplication.cpp @@ -391,7 +391,7 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) CancelFunctionTimer(); mFunction = kFunction_NoneSelected; -#ifdef DISPLAY_ENABLED +#ifdef QR_CODE_ENABLED // TOGGLE QRCode/LCD demo UI slLCD.ToggleQRCode(); #endif diff --git a/examples/platform/efr32/display/lcd.cpp b/examples/platform/efr32/display/lcd.cpp index 9b66cfe1f024cc..e73770259358e8 100644 --- a/examples/platform/efr32/display/lcd.cpp +++ b/examples/platform/efr32/display/lcd.cpp @@ -122,10 +122,12 @@ int SilabsLCD::Update(void) void SilabsLCD::WriteDemoUI(bool state) { +#ifdef QR_CODE_ENABLED if (mShowQRCode) { mShowQRCode = false; } +#endif dState.mainState = state; WriteDemoUI(); }