diff --git a/aether/dns/esp32_dns_resolve.cpp b/aether/dns/esp32_dns_resolve.cpp index bd80078d..6de5d20d 100644 --- a/aether/dns/esp32_dns_resolve.cpp +++ b/aether/dns/esp32_dns_resolve.cpp @@ -32,6 +32,7 @@ # include "lwip/err.h" # include "lwip/sys.h" # include "lwip/dns.h" +# include "lwip/tcpip.h" # include "aether/aether.h" # include "aether/actions/action_context.h" @@ -71,6 +72,7 @@ class GethostByNameDnsResolver { // make query ip_addr_t cached_addr; + LOCK_TCPIP_CORE(); auto res = dns_gethostbyname( name_address.name.c_str(), &cached_addr, [](const char* /* name */, const ip_addr_t* ipaddr, @@ -79,6 +81,7 @@ class GethostByNameDnsResolver { context->self->QueryResult(*context, ipaddr); }, &query_context); + UNLOCK_TCPIP_CORE(); if (res == ERR_OK) { QueryResult(query_context, &cached_addr); diff --git a/examples/cloud/cloud_test.cpp b/examples/cloud/cloud_test.cpp index 303174eb..96529d91 100644 --- a/examples/cloud/cloud_test.cpp +++ b/examples/cloud/cloud_test.cpp @@ -39,8 +39,8 @@ #include "aether/tele/tele.h" -static constexpr std::string_view kWifiSsid = "Test"; -static constexpr std::string_view kWifiPass = "Test"; +static constexpr std::string_view kWifiSsid = "Test1234"; +static constexpr std::string_view kWifiPass = "Test1234"; namespace ae::cloud_test { constexpr ae::SafeStreamConfig kSafeStreamConfig{ diff --git a/examples/key_led/key_led_test.cpp b/examples/key_led/key_led_test.cpp index d06c1a2a..0bde91b0 100644 --- a/examples/key_led/key_led_test.cpp +++ b/examples/key_led/key_led_test.cpp @@ -45,8 +45,8 @@ using std::vector; -static constexpr std::string_view kWifiSsid = "Test123"; -static constexpr std::string_view kWifiPass = "Test123"; +static constexpr std::string_view kWifiSsid = "Test1234"; +static constexpr std::string_view kWifiPass = "Test1234"; static constexpr bool kUseAether = true; namespace ae::key_led_test { diff --git a/projects/espressif_riscv/platformio/aether-client-cpp/CMakeLists.txt b/projects/espressif_riscv/platformio/aether-client-cpp/CMakeLists.txt index 92cd27cf..7154b12a 100644 --- a/projects/espressif_riscv/platformio/aether-client-cpp/CMakeLists.txt +++ b/projects/espressif_riscv/platformio/aether-client-cpp/CMakeLists.txt @@ -42,8 +42,8 @@ set(AE_DISTILLATION OFF CACHE BOOL "" FORCE) list(APPEND EXTRA_COMPONENT_DIRS "../../../../aether" # "../../../../examples/cloud" - "../../../../examples/key_led" -# "../../../../examples/registered" +# "../../../../examples/key_led" + "../../../../examples/registered" # "../../../../examples/benches/send_message_delays" ) diff --git a/projects/espressif_riscv/platformio/aether-client-cpp/platformio.ini b/projects/espressif_riscv/platformio/aether-client-cpp/platformio.ini index 26486244..29d284a5 100644 --- a/projects/espressif_riscv/platformio/aether-client-cpp/platformio.ini +++ b/projects/espressif_riscv/platformio/aether-client-cpp/platformio.ini @@ -23,9 +23,11 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -src_dir = ../../../../examples/button -; src_dir = ../../../../examples/benches/send_message_delays ;src_dir = ../../../../examples/cloud +;src_dir = ../../../../examples/key_led +src_dir = ../../../../examples/registered +;src_dir = ../../../../examples/benches/send_message_delays + [env:esp32-c6-devkitm-1] platform = platformio/espressif32 framework = espidf diff --git a/projects/espressif_riscv/vscode/aether-client-cpp/CMakeLists.txt b/projects/espressif_riscv/vscode/aether-client-cpp/CMakeLists.txt index d25d5eb3..483860aa 100644 --- a/projects/espressif_riscv/vscode/aether-client-cpp/CMakeLists.txt +++ b/projects/espressif_riscv/vscode/aether-client-cpp/CMakeLists.txt @@ -26,7 +26,7 @@ idf_build_set_property(CM_PLATFORM "ESP32") add_compile_definitions(CM_ESP32) if(NOT COMPILE_EXAMPLE ) - set(COMPILE_EXAMPLE "key_led") + set(COMPILE_EXAMPLE "registered") endif() if (NOT USER_CONFIG) diff --git a/projects/xtensa_lx6/platformio/aether-client-cpp/CMakeLists.txt b/projects/xtensa_lx6/platformio/aether-client-cpp/CMakeLists.txt index 92cd27cf..7154b12a 100644 --- a/projects/xtensa_lx6/platformio/aether-client-cpp/CMakeLists.txt +++ b/projects/xtensa_lx6/platformio/aether-client-cpp/CMakeLists.txt @@ -42,8 +42,8 @@ set(AE_DISTILLATION OFF CACHE BOOL "" FORCE) list(APPEND EXTRA_COMPONENT_DIRS "../../../../aether" # "../../../../examples/cloud" - "../../../../examples/key_led" -# "../../../../examples/registered" +# "../../../../examples/key_led" + "../../../../examples/registered" # "../../../../examples/benches/send_message_delays" ) diff --git a/projects/xtensa_lx6/platformio/aether-client-cpp/platformio.ini b/projects/xtensa_lx6/platformio/aether-client-cpp/platformio.ini index a0338724..5b277a2b 100644 --- a/projects/xtensa_lx6/platformio/aether-client-cpp/platformio.ini +++ b/projects/xtensa_lx6/platformio/aether-client-cpp/platformio.ini @@ -23,9 +23,11 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -src_dir = ../../../../examples/button -; src_dir = ../../../../examples/benches/send_message_delays ;src_dir = ../../../../examples/cloud +;src_dir = ../../../../examples/key_led +src_dir = ../../../../examples/registered +;src_dir = ../../../../examples/benches/send_message_delays + [env:esp-wrover-kit] platform = platformio/espressif32 framework = espidf diff --git a/projects/xtensa_lx6/vscode/aether-client-cpp/CMakeLists.txt b/projects/xtensa_lx6/vscode/aether-client-cpp/CMakeLists.txt index 42acdbd8..483860aa 100644 --- a/projects/xtensa_lx6/vscode/aether-client-cpp/CMakeLists.txt +++ b/projects/xtensa_lx6/vscode/aether-client-cpp/CMakeLists.txt @@ -26,7 +26,7 @@ idf_build_set_property(CM_PLATFORM "ESP32") add_compile_definitions(CM_ESP32) if(NOT COMPILE_EXAMPLE ) - set(COMPILE_EXAMPLE "key_led") + set(COMPILE_EXAMPLE "registered") endif() if (NOT USER_CONFIG) @@ -40,6 +40,7 @@ endif() # enable doubles in unity tests add_compile_definitions("CONFIG_UNITY_ENABLE_DOUBLE") +set(AE_DISTILLATION OFF CACHE BOOL "" FORCE) list(APPEND EXTRA_COMPONENT_DIRS "../../../../aether" "../../../../examples/cloud" diff --git a/scripts/update_arduino_lib.py b/scripts/update_arduino_lib.py index 8b7d2bda..11704761 100755 --- a/scripts/update_arduino_lib.py +++ b/scripts/update_arduino_lib.py @@ -21,11 +21,14 @@ # and call this script with -out # +import io import re import os import shutil import argparse +from pathlib import PureWindowsPath + # copy only files what matches FILTER_SOURCES = re.compile(r'^[\d\w\-_]+($|(\.((h)|(hpp)|(hh)|(c)|(cpp)|(cc)|(md))$))') # list names should not copied to arduino library @@ -112,13 +115,14 @@ def fix_include_paths(dir: str): if not re_sources.match(f): continue file_path = os.path.join(root, f) - lines = open(file_path, 'r').readlines() - with open(file_path, 'w') as open_file: + lines = io.open(file_path, 'r', encoding='utf-8').readlines() + with io.open(file_path, 'w', encoding='utf-8') as open_file: for l in lines: match = re_include.match(l) if match: should_include = get_file_path_relative_to(match[1], root, base_dir) l = '#include \"{}\"\n'.format(should_include) + l = PureWindowsPath(l).as_posix() open_file.write(l) def copy_aether_dir(aether_path:str, out_dir: str):