CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
QRCodeView.cpp File Reference
#include "cdc_views/QRCodeView.h"
#include "cdc_ui/ViewStack.h"
#include "cdc_ui/I18n.h"
#include "cdc_hal/IDisplay.h"
#include "cdc_log.h"
#include "qrcode.h"
#include "cdc_views/Fonts.h"
#include "cdc_views/RenderHelpers.h"
#include <goodisplay/gdey029T94.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::ui
 Centralized key-code constants for cdc_views.

Functions

static void cdc::ui::qrDisplayCallback (esp_qrcode_handle_t qrcode)
 Renders or measures the QR code through the ESP QR callback.
QRCodeViewcdc::ui::showQRCode (const char *data, const char *title, const char *subtitle, const char *hint)
 Shows a shared QR code view instance.

Variables

static const char * TAG = "QRCodeView"
static constexpr int DISPLAY_WIDTH = 296
 Display dimensions for Gdey029T94 panel.
static constexpr int DISPLAY_HEIGHT = 128
static constexpr int QR_MARGIN = 0
struct { 
   int   cdc::ui::offsetX 
   int   cdc::ui::offsetY 
   int   cdc::ui::scale 
   int   cdc::ui::actualSize 
   bool   cdc::ui::sizingPass 
   Gdey029T94 *   cdc::ui::display 
cdc::ui::s_qrCtx
 QR rendering context used by callback-driven rendering.
static QRCodeView cdc::ui::s_sharedQRCodeView
 Convenience factory/helper function.

Variable Documentation

◆ DISPLAY_HEIGHT

int DISPLAY_HEIGHT = 128
staticconstexpr

Definition at line 26 of file QRCodeView.cpp.

◆ DISPLAY_WIDTH

int DISPLAY_WIDTH = 296
staticconstexpr

Display dimensions for Gdey029T94 panel.

Definition at line 25 of file QRCodeView.cpp.

◆ QR_MARGIN

int QR_MARGIN = 0
staticconstexpr

Definition at line 27 of file QRCodeView.cpp.

◆ TAG

const char* TAG = "QRCodeView"
static

QRCodeView Implementation

QR code display with two-pass rendering for optimal sizing. Layout: QR on left, text on right.

Definition at line 20 of file QRCodeView.cpp.