Skip to content

Commit

Permalink
20240530
Browse files Browse the repository at this point in the history
- Change framework Arduino Release v3.0.0 based on ESP-IDF v5.1.4
- Add a check for the DNS server address update, - the fourth block should not be equal to zero
  • Loading branch information
xyzroe committed May 30, 2024
1 parent 7e1fa0a commit 08ee894
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ lib_deps =
monitor_filters = direct ; log2file ; esp32_exception_decoder, default ;
monitor_speed = 115200
upload_speed = 460800
;platform_packages =
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master
; framework-arduinoespressif32 @ https://github.com/husarnet/arduino-esp32/releases/download/1.0.4-1/arduino-husarnet-esp32.zip ;husarnet example
extra_scripts =
pre:tools/build/pre_build.py
Expand Down Expand Up @@ -82,7 +83,7 @@ extra_scripts =


[env:debug]
platform = espressif32 @ 6.6.0
platform = espressif32 @ 6.7.0
;platform = [email protected] ;husarnet example
board = esp32dev
build_flags =
Expand All @@ -91,5 +92,4 @@ build_flags =
extra_scripts =
${env.extra_scripts}
lib_deps =
${env.lib_deps}

${env.lib_deps}
14 changes: 12 additions & 2 deletions src/etc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,12 @@ void checkDNS(bool setup = false)
if (networkCfg.wifiEnable)
{
IPAddress currentWifiDNS = WiFi.dnsIP();
if (setup)

String dnsStr = currentWifiDNS.toString();
int lastDot = dnsStr.lastIndexOf('.');
String fourthPart = dnsStr.substring(lastDot + 1);

if (setup && fourthPart.toInt() != 0)
{
savedWifiDNS = currentWifiDNS;
snprintf(buffer, sizeof(buffer), "%s %s %s - %s", dnsTagKey, savedKey, wifiKey, savedWifiDNS.toString().c_str());
Expand All @@ -434,7 +439,12 @@ void checkDNS(bool setup = false)
if (networkCfg.ethEnable)
{
IPAddress currentEthDNS = ETH.dnsIP();
if (setup)

String dnsStr = currentEthDNS.toString();
int lastDot = dnsStr.lastIndexOf('.');
String fourthPart = dnsStr.substring(lastDot + 1);

if (setup && fourthPart.toInt() != 0)
{
savedEthDNS = currentEthDNS;
snprintf(buffer, sizeof(buffer), "%s %s %s - %s", dnsTagKey, savedKey, ethKey, savedEthDNS.toString().c_str());
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// AUTO GENERATED FILE
#ifndef VERSION
#define VERSION "20240529"
#define VERSION "20240530"
#endif

0 comments on commit 08ee894

Please sign in to comment.