From 107238019f3474370aeb4e4978b437e94688ccce Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 2 Jun 2022 13:26:08 -0400 Subject: [PATCH] fix define for qr code (#19067) --- examples/light-switch-app/efr32/src/AppTask.cpp | 4 ++-- examples/lighting-app/efr32/src/AppTask.cpp | 4 ++-- examples/lock-app/efr32/src/AppTask.cpp | 4 ++-- examples/ota-requestor-app/efr32/src/AppTask.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/light-switch-app/efr32/src/AppTask.cpp b/examples/light-switch-app/efr32/src/AppTask.cpp index d7da5a17ea4d24..fe982497bd6245 100644 --- a/examples/light-switch-app/efr32/src/AppTask.cpp +++ b/examples/light-switch-app/efr32/src/AppTask.cpp @@ -240,7 +240,7 @@ CHIP_ERROR AppTask::Init() } // Print setup info on LCD if available -#ifdef DISPLAY_ENABLED +#ifdef QR_CODE_ENABLED // Create buffer for QR code that can fit max size and null terminator. char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); @@ -255,7 +255,7 @@ CHIP_ERROR AppTask::Init() } #else PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); -#endif +#endif // QR_CODE_ENABLED return err; } diff --git a/examples/lighting-app/efr32/src/AppTask.cpp b/examples/lighting-app/efr32/src/AppTask.cpp index 040f0c715cdf38..cf95bdf2c036cd 100644 --- a/examples/lighting-app/efr32/src/AppTask.cpp +++ b/examples/lighting-app/efr32/src/AppTask.cpp @@ -284,7 +284,7 @@ CHIP_ERROR AppTask::Init() ConfigurationMgr().LogDeviceConfig(); // Print setup info on LCD if available -#ifdef DISPLAY_ENABLED +#if QR_CODE_ENABLED // Create buffer for QR code that can fit max size and null terminator. char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); @@ -299,7 +299,7 @@ CHIP_ERROR AppTask::Init() } #else PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); -#endif +#endif // QR_CODE_ENABLED return err; } diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp index 2df296d38e49fb..78fe30c3e82453 100644 --- a/examples/lock-app/efr32/src/AppTask.cpp +++ b/examples/lock-app/efr32/src/AppTask.cpp @@ -275,7 +275,7 @@ CHIP_ERROR AppTask::Init() ConfigurationMgr().LogDeviceConfig(); // Print setup info on LCD if available -#ifdef DISPLAY_ENABLED +#ifdef QR_CODE_ENABLED // Create buffer for QR code that can fit max size and null terminator. char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); @@ -290,7 +290,7 @@ CHIP_ERROR AppTask::Init() } #else PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); -#endif +#endif // QR_CODE_ENABLED return err; } diff --git a/examples/ota-requestor-app/efr32/src/AppTask.cpp b/examples/ota-requestor-app/efr32/src/AppTask.cpp index 31f819f77e7540..6562e0bd43f0fe 100644 --- a/examples/ota-requestor-app/efr32/src/AppTask.cpp +++ b/examples/ota-requestor-app/efr32/src/AppTask.cpp @@ -171,7 +171,7 @@ CHIP_ERROR AppTask::Init() ConfigurationMgr().LogDeviceConfig(); // Print setup info on LCD if available -#ifdef DISPLAY_ENABLED +#ifdef QR_CODE_ENABLED // Create buffer for QR code that can fit max size and null terminator. char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); @@ -186,7 +186,7 @@ CHIP_ERROR AppTask::Init() } #else PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); -#endif +#endif // QR_CODE_ENABLED // Initialize OTA components InitOTARequestor();