Skip to content

Commit

Permalink
Add BBL 2FA
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiments committed Nov 4, 2024
1 parent c0b474b commit 44155df
Show file tree
Hide file tree
Showing 9 changed files with 1,834 additions and 1,143 deletions.
10 changes: 10 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

[Discord Server](https://discord.gg/RytEDEgfR3)

## NEW 5 inch Screen

![image](readme-assets/xtouch_5.png)

- The new 5-inch version is now available for purchase on AliExpress.
- We're currently in the final stages of development.
- You can find it at the following link:

[BUY New 5inch Screen](https://s.click.aliexpress.com/e/_DBdoa6n)

## Table of Contents

1. [Introduction](#introduction)
Expand Down
5 changes: 3 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ lib_deps =
https://github.com/PaulStoffregen/XPT2046_Touchscreen.git
lvgl/[email protected]
https://github.com/knolleary/pubsubclient.git
https://github.com/bblanchon/ArduinoJson.git
ArduinoJson@6.21.5
FS
SD
https://github.com/PaulStoffregen/OneWire.git
https://github.com/milesburton/Arduino-Temperature-Control-Library.git
https://github.com/me-no-dev/ESPAsyncWebServer.git
build_flags =
-D__XTOUCH_SCREEN_28__
!python3 scripts/version.py
extra_scripts =
scripts/pre-build.py
post:scripts/post-build.py
scripts/post-build.py

23 changes: 20 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "xtouch/events.h"
#include "xtouch/connection.h"
#include "xtouch/coldboot.h"
#include "xtouch/webserver.h"

void xtouch_intro_show(void)
{
Expand Down Expand Up @@ -62,8 +63,23 @@ void setup()

xtouch_screen_setupScreenTimer();
xtouch_setupGlobalEvents();
if (cloud.login())
if (!cloud.hasAuthTokens())
{
cloud.mainLogin("");

if (!cloud.mainLogin(""))
{
xtouch_webserver_begin();
}
else
{
xtouch_mqtt_setup();
}
}
else
{
cloud.loadAuthTokens();

if (!cloud.isPaired())
{
cloud.selectPrinter();
Expand All @@ -72,14 +88,15 @@ void setup()
{
cloud.loadPair();
}
xtouch_mqtt_setup();
}
xtouch_mqtt_setup();
xtouch_chamber_timer_init();
}

void loop()
{
lv_timer_handler();
lv_task_handler();
xtouch_mqtt_loop();
if (cloud.loggedIn)
xtouch_mqtt_loop();
}
Loading

0 comments on commit 44155df

Please sign in to comment.