From d1610278707f28225411b1b6b27b1bb0f6a6d0c1 Mon Sep 17 00:00:00 2001 From: Im Nix <85513545+Niximkk@users.noreply.github.com> Date: Tue, 16 Jan 2024 00:23:17 -0300 Subject: [PATCH] Fixed the QR Code flickering and also the qr code will be bigger and centralized. --- m5stick-nemo.ino | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/m5stick-nemo.ino b/m5stick-nemo.ino index fc32c1d..78aed1d 100644 --- a/m5stick-nemo.ino +++ b/m5stick-nemo.ino @@ -1601,21 +1601,25 @@ void qrmenu_setup() { delay(500); // Prevent switching after menu loads up } +boolean isOn = false; + void qrmenu_loop() { if (check_next_press()) { cursor++; cursor = cursor % ( sizeof(qrcodes) / sizeof(QRCODE) ); qrmenu_drawmenu(); + isOn = false; delay(250); } if (check_select_press()) { - if(qrcodes[cursor].url.length() == 0){ - rstOverride = false; +@@ -1614,8 +1617,9 @@ void qrmenu_loop() { isSwitching = true; current_proc = 1; }else{ + isOn = true; DISP.fillScreen(WHITE); DISP.qrcode(qrcodes[cursor].url, 0, 0, 80, 5); + DISP.qrcode(qrcodes[cursor].url, (DISP.width() - DISP.height()) / 2, 0, DISP.height(), 5); } } }