Skip to content

Commit

Permalink
Fix efr32-brd4161a-lock-rpc build
Browse files Browse the repository at this point in the history
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:
  • Loading branch information
mspang committed Aug 25, 2022
1 parent b2358dd commit d460352
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/platform/efr32/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions examples/platform/efr32/display/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit d460352

Please sign in to comment.