Skip to content

Commit

Permalink
Pull request SiliconLabs#9: Update QRCode method
Browse files Browse the repository at this point in the history
Merge in WMN_TOOLS/matter from fix_ci to silabs

Squashed commit of the following:

commit 784b59e8e9a20c4fb89266d8a06391a0bbb5640f
Author: jepenven-silabs <jean-francois.penven@silabs.com>
Date:   Tue Jul 5 14:33:59 2022 -0400

    Update QRCode method
  • Loading branch information
jepenven-silabs authored and mkardous-silabs committed Oct 4, 2022
1 parent 23bea53 commit c84f6fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions silabs_examples/template/efr32/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,13 @@ CHIP_ERROR AppTask::Init()

// Print setup info on LCD if available
#ifdef DISPLAY_ENABLED
std::string QRCode;
// Create buffer for QR code that can fit max size and null terminator.
char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1];
chip::MutableCharSpan QRCode(qrCodeBuffer);

if (GetQRCode(QRCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)) == CHIP_NO_ERROR)
{
LCDWriteQRCode((uint8_t *) QRCode.c_str());
LCDWriteQRCode((uint8_t *) QRCode.data());
}
else
{
Expand Down

0 comments on commit c84f6fe

Please sign in to comment.