Skip to content

Commit

Permalink
Pull request project-chip#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 jmartinez-silabs committed Aug 30, 2022
1 parent a4a3463 commit a5053c2
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 a5053c2

Please sign in to comment.