diff --git a/CMakeLists.txt b/CMakeLists.txt index 753e81c5..38648f2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,8 @@ if(UD_DEBUG STREQUAL "") set(UD_GEN 0) endif() -# Make sure we reconfigure if UD_GEN and UD_DEBUG changes +# Make sure we reconfigure if UD_GEN changes set_property(GLOBAL PROPERTY UD_GEN_TRACKER "${UD_GEN}") -set_property(GLOBAL PROPERTY UD_DEBUG_TRACKER "${UD_DEBUG}") if(UD_GEN STREQUAL "MK4") if (NOT "$ENV{IDF_TARGET}" STREQUAL "esp32s2") diff --git a/data-templates/i2c-mk7.json b/data-templates/i2c-mk7.json new file mode 100644 index 00000000..e446f43c --- /dev/null +++ b/data-templates/i2c-mk7.json @@ -0,0 +1,14 @@ +{ + "instance": "DEVICE_INSTANCE", + "id": "DEVICE_ID", + "peripherals": [ + { + "type": "environment:htu2x", + "params": { + "sda": "A2", + "scl": "A4" + } + } + ], + "sleepWhenIdle": true +} diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index db9f4bb0..24b65b91 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,5 +1,15 @@ FILE(GLOB_RECURSE app_sources main.cpp **/*.cpp) +if(NOT DEFINED UD_DEBUG) + set(UD_DEBUG "$ENV{UD_DEBUG}") +endif() +if(UD_DEBUG STREQUAL "") + set(UD_DEBUG 0) +endif() + +# Make sure we reconfigure if UD_DEBUG changes +set_property(DIRECTORY PROPERTY UD_DEBUG_TRACKER "${UD_DEBUG}") + idf_component_register( SRCS ${app_sources} INCLUDE_DIRS "."