Add support board DIY Pro 3.7 and add example

This commit is contained in:
Phat Nguyen
2024-06-20 11:34:23 +07:00
parent 7560251deb
commit 0119a4d62a
13 changed files with 1099 additions and 77 deletions

View File

@ -49,7 +49,7 @@ bool WifiConnector::connect(void) {
WIFI()->setSaveConfigCallback([this]() { _wifiSaveConfig(); });
WIFI()->setSaveParamsCallback([this]() { _wifiSaveParamCallback(); });
WIFI()->setConfigPortalTimeoutCallback([this]() {_wifiTimeoutCallback();});
if (ag->isOne() || (ag->isPro4_2())) {
if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_7()) {
disp.setText("Connecting to", "WiFi", "...");
} else {
logInfo("Connecting to WiFi...");
@ -142,7 +142,7 @@ bool WifiConnector::connect(void) {
/** Show display wifi connect result failed */
if (WiFi.isConnected() == false) {
sm.handleLeds(AgStateMachineWiFiManagerConnectFailed);
if (ag->isOne() || ag->isPro4_2()) {
if (ag->isOne() || ag->isPro4_2() || ag->isPro3_7()) {
sm.displayHandle(AgStateMachineWiFiManagerConnectFailed);
}
delay(6000);
@ -247,7 +247,7 @@ void WifiConnector::_wifiProcess() {
if (WiFi.isConnected() == false) {
/** Display countdown */
uint32_t ms;
if (ag->isOne() || (ag->isPro4_2())) {
if (ag->isOne() || (ag->isPro4_2()) || ag->isPro3_7()) {
ms = (uint32_t)(millis() - dispPeriod);
if (ms >= 1000) {
dispPeriod = millis();