Add check for WiFi when scanning with QR code
This commit is contained in:
@@ -39,6 +39,7 @@ int init_services(void)
|
|||||||
{
|
{
|
||||||
cfguInit();
|
cfguInit();
|
||||||
ptmuInit();
|
ptmuInit();
|
||||||
|
acInit();
|
||||||
httpcInit(0);
|
httpcInit(0);
|
||||||
archive_result = open_archives();
|
archive_result = open_archives();
|
||||||
homebrew = true;
|
homebrew = true;
|
||||||
@@ -62,6 +63,7 @@ int exit_services(void)
|
|||||||
cfguExit();
|
cfguExit();
|
||||||
ptmuExit();
|
ptmuExit();
|
||||||
httpcExit();
|
httpcExit();
|
||||||
|
acExit();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,10 +139,18 @@ int main(void)
|
|||||||
if (preview_mode) {
|
if (preview_mode) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
qr_mode = !qr_mode;
|
u32 out;
|
||||||
if (qr_mode) init_qr();
|
ACU_GetWifiStatus(&out);
|
||||||
else exit_qr();
|
if (out)
|
||||||
continue;
|
{
|
||||||
|
qr_mode = !qr_mode;
|
||||||
|
if (qr_mode) init_qr();
|
||||||
|
else exit_qr();
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
throw_error("Please connect to Wi-Fi before scanning QR", WARNING);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user