File tree Expand file tree Collapse file tree
platformio/aether-client-cpp
platformio/aether-client-cpp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232# include " lwip/err.h"
3333# include " lwip/sys.h"
3434# include " lwip/dns.h"
35+ # include " lwip/tcpip.h"
3536
3637# include " aether/aether.h"
3738# include " aether/actions/action_context.h"
@@ -71,6 +72,7 @@ class GethostByNameDnsResolver {
7172
7273 // make query
7374 ip_addr_t cached_addr;
75+ LOCK_TCPIP_CORE ();
7476 auto res = dns_gethostbyname (
7577 name_address.name .c_str (), &cached_addr,
7678 [](const char * /* name */ , const ip_addr_t * ipaddr,
@@ -79,6 +81,7 @@ class GethostByNameDnsResolver {
7981 context->self ->QueryResult (*context, ipaddr);
8082 },
8183 &query_context);
84+ UNLOCK_TCPIP_CORE ();
8285
8386 if (res == ERR_OK) {
8487 QueryResult (query_context, &cached_addr);
Original file line number Diff line number Diff line change 3939
4040#include " aether/tele/tele.h"
4141
42- static constexpr std::string_view kWifiSsid = " Test " ;
43- static constexpr std::string_view kWifiPass = " Test " ;
42+ static constexpr std::string_view kWifiSsid = " Test1234 " ;
43+ static constexpr std::string_view kWifiPass = " Test1234 " ;
4444
4545namespace ae ::cloud_test {
4646constexpr ae::SafeStreamConfig kSafeStreamConfig {
Original file line number Diff line number Diff line change 4545
4646using std::vector;
4747
48- static constexpr std::string_view kWifiSsid = " Test123 " ;
49- static constexpr std::string_view kWifiPass = " Test123 " ;
48+ static constexpr std::string_view kWifiSsid = " Test1234 " ;
49+ static constexpr std::string_view kWifiPass = " Test1234 " ;
5050static constexpr bool kUseAether = true ;
5151
5252namespace ae ::key_led_test {
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ set(AE_DISTILLATION OFF CACHE BOOL "" FORCE)
4242
4343list (APPEND EXTRA_COMPONENT_DIRS "../../../../aether"
4444# "../../../../examples/cloud"
45- "../../../../examples/key_led"
46- # "../../../../examples/registered"
45+ # "../../../../examples/key_led"
46+ "../../../../examples/registered"
4747# "../../../../examples/benches/send_message_delays"
4848)
4949
Original file line number Diff line number Diff line change 2323; https://docs.platformio.org/page/projectconf.html
2424
2525[platformio]
26- src_dir = ../../../../examples/button
27- ; src_dir = ../../../../examples/benches/send_message_delays
2826; src_dir = ../../../../examples/cloud
27+ ; src_dir = ../../../../examples/key_led
28+ src_dir = ../../../../examples/registered
29+ ; src_dir = ../../../../examples/benches/send_message_delays
30+
2931[env:esp32-c6-devkitm-1]
3032platform = platformio/espressif32
3133framework = espidf
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ idf_build_set_property(CM_PLATFORM "ESP32")
2626add_compile_definitions (CM_ESP32 )
2727
2828if (NOT COMPILE_EXAMPLE )
29- set (COMPILE_EXAMPLE "key_led " )
29+ set (COMPILE_EXAMPLE "registered " )
3030endif ()
3131
3232if (NOT USER_CONFIG)
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ set(AE_DISTILLATION OFF CACHE BOOL "" FORCE)
4242
4343list (APPEND EXTRA_COMPONENT_DIRS "../../../../aether"
4444# "../../../../examples/cloud"
45- "../../../../examples/key_led"
46- # "../../../../examples/registered"
45+ # "../../../../examples/key_led"
46+ "../../../../examples/registered"
4747# "../../../../examples/benches/send_message_delays"
4848)
4949
Original file line number Diff line number Diff line change 2323; https://docs.platformio.org/page/projectconf.html
2424
2525[platformio]
26- src_dir = ../../../../examples/button
27- ; src_dir = ../../../../examples/benches/send_message_delays
2826; src_dir = ../../../../examples/cloud
27+ ; src_dir = ../../../../examples/key_led
28+ src_dir = ../../../../examples/registered
29+ ; src_dir = ../../../../examples/benches/send_message_delays
30+
2931[env:esp-wrover-kit]
3032platform = platformio/espressif32
3133framework = espidf
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ idf_build_set_property(CM_PLATFORM "ESP32")
2626add_compile_definitions (CM_ESP32 )
2727
2828if (NOT COMPILE_EXAMPLE )
29- set (COMPILE_EXAMPLE "key_led " )
29+ set (COMPILE_EXAMPLE "registered " )
3030endif ()
3131
3232if (NOT USER_CONFIG)
@@ -40,6 +40,7 @@ endif()
4040# enable doubles in unity tests
4141add_compile_definitions ("CONFIG_UNITY_ENABLE_DOUBLE" )
4242
43+ set (AE_DISTILLATION OFF CACHE BOOL "" FORCE )
4344
4445list (APPEND EXTRA_COMPONENT_DIRS "../../../../aether"
4546 "../../../../examples/cloud"
Original file line number Diff line number Diff line change 2121# and call this script with -out <path to aether-client-arduino-library>
2222#
2323
24+ import io
2425import re
2526import os
2627import shutil
2728import argparse
2829
30+ from pathlib import PureWindowsPath
31+
2932# copy only files what matches
3033FILTER_SOURCES = re .compile (r'^[\d\w\-_]+($|(\.((h)|(hpp)|(hh)|(c)|(cpp)|(cc)|(md))$))' )
3134# list names should not copied to arduino library
@@ -112,13 +115,14 @@ def fix_include_paths(dir: str):
112115 if not re_sources .match (f ):
113116 continue
114117 file_path = os .path .join (root , f )
115- lines = open (file_path , 'r' ).readlines ()
116- with open (file_path , 'w' ) as open_file :
118+ lines = io . open (file_path , 'r' , encoding = 'utf-8 ' ).readlines ()
119+ with io . open (file_path , 'w' , encoding = 'utf-8 ' ) as open_file :
117120 for l in lines :
118121 match = re_include .match (l )
119122 if match :
120123 should_include = get_file_path_relative_to (match [1 ], root , base_dir )
121124 l = '#include \" {}\" \n ' .format (should_include )
125+ l = PureWindowsPath (l ).as_posix ()
122126 open_file .write (l )
123127
124128def copy_aether_dir (aether_path :str , out_dir : str ):
You can’t perform that action at this time.
0 commit comments