From aad75ca4e9faa91031ad5f8e9cfab8ebc1d126b3 Mon Sep 17 00:00:00 2001 From: Im Nix <85513545+Niximkk@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:29:23 -0300 Subject: [PATCH] Fixed the 'else if' and changed the Var name and location. --- m5stick-nemo.ino | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/m5stick-nemo.ino b/m5stick-nemo.ino index 78aed1d..8641566 100644 --- a/m5stick-nemo.ino +++ b/m5stick-nemo.ino @@ -168,6 +168,7 @@ bool swiftPair = false; // Internal flag to place AppleJuice into Swift Pair bool androidPair = false; // Internal flag to place AppleJuice into Android Pair random packet Mode bool maelstrom = false; // Internal flag to place AppleJuice into Bluetooth Maelstrom mode bool portal_active = false; // Internal flag used to ensure NEMO Portal exits cleanly +bool activeQR = false; const byte PortalTickTimer = 1000; String apSsidName = String(""); bool isSwitching = true; @@ -1600,23 +1601,20 @@ void qrmenu_setup() { qrmenu_drawmenu(); 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; + activeQR = false; delay(250); } if (check_select_press()) { @@ -1614,8 +1617,9 @@ void qrmenu_loop() { isSwitching = true; current_proc = 1; - }else{ - isOn = true; + }else if ( activeQR == false ) { + activeQR = 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);