Fixed the QR Code flickering and also the qr code will be bigger and centralized.
This commit is contained in:
parent
752cc40697
commit
d161027870
|
@ -1601,21 +1601,25 @@ void qrmenu_setup() {
|
||||||
delay(500); // Prevent switching after menu loads up
|
delay(500); // Prevent switching after menu loads up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isOn = false;
|
||||||
|
|
||||||
void qrmenu_loop() {
|
void qrmenu_loop() {
|
||||||
if (check_next_press()) {
|
if (check_next_press()) {
|
||||||
cursor++;
|
cursor++;
|
||||||
cursor = cursor % ( sizeof(qrcodes) / sizeof(QRCODE) );
|
cursor = cursor % ( sizeof(qrcodes) / sizeof(QRCODE) );
|
||||||
qrmenu_drawmenu();
|
qrmenu_drawmenu();
|
||||||
|
isOn = false;
|
||||||
delay(250);
|
delay(250);
|
||||||
}
|
}
|
||||||
if (check_select_press()) {
|
if (check_select_press()) {
|
||||||
if(qrcodes[cursor].url.length() == 0){
|
@@ -1614,8 +1617,9 @@ void qrmenu_loop() {
|
||||||
rstOverride = false;
|
|
||||||
isSwitching = true;
|
isSwitching = true;
|
||||||
current_proc = 1;
|
current_proc = 1;
|
||||||
}else{
|
}else{
|
||||||
|
isOn = true;
|
||||||
DISP.fillScreen(WHITE);
|
DISP.fillScreen(WHITE);
|
||||||
DISP.qrcode(qrcodes[cursor].url, 0, 0, 80, 5);
|
DISP.qrcode(qrcodes[cursor].url, 0, 0, 80, 5);
|
||||||
|
DISP.qrcode(qrcodes[cursor].url, (DISP.width() - DISP.height()) / 2, 0, DISP.height(), 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue