Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5c2ebf4
feat(touch): Support all touch versions in NG driver
P-R-O-C-H-Y Jul 25, 2025
41287a3
fix(ci): Update touch test
P-R-O-C-H-Y Jul 25, 2025
0a36580
fix(touch): Update example and fix config
P-R-O-C-H-Y Jul 25, 2025
09336ac
fix(touch): Use correct type
P-R-O-C-H-Y Jul 25, 2025
399094d
fix(touch): Remove old driver from cmake
P-R-O-C-H-Y Jul 25, 2025
ec720a8
fix(touch): Update touchSetConfig for S2 and S3
P-R-O-C-H-Y Jul 25, 2025
7143d08
fix(touch): Revert old touch driver for older IDF
P-R-O-C-H-Y Jul 25, 2025
f691a42
fix(touch): Add missing include
P-R-O-C-H-Y Jul 25, 2025
04459fa
fix(touch): Update test and example
P-R-O-C-H-Y Jul 25, 2025
5653eb6
refactor(ble): Pass primitive types by value
Kolcha Aug 21, 2025
c6517e4
refactor(ble): Simplify setValue() for primitive types
Kolcha Aug 21, 2025
273eedf
refactor(ble): Pass pointer to const data to setValue()
Kolcha Aug 21, 2025
5edf464
refactor(ble): Avoid unnecessary String copies
Kolcha Aug 21, 2025
73ccce2
Merge branch 'master' into ble-cleanup
SuGlider Aug 22, 2025
c80c3b7
Merge branch 'master' into feat/touch-ng-all-socs
P-R-O-C-H-Y Aug 25, 2025
79760ba
fix(component): Require touch driver for older SoCs
P-R-O-C-H-Y Aug 25, 2025
942a905
fix(ci): Add delay to isr test
P-R-O-C-H-Y Aug 25, 2025
6e96c1d
ci: Increase log level
P-R-O-C-H-Y Aug 26, 2025
44c5abf
Update pytest.ini
P-R-O-C-H-Y Aug 26, 2025
b9d409f
Update tests_run.sh
P-R-O-C-H-Y Aug 26, 2025
d9a8eaa
Update touch.ino
P-R-O-C-H-Y Aug 26, 2025
523fb52
update
P-R-O-C-H-Y Aug 26, 2025
cd5078b
Update touch.ino
P-R-O-C-H-Y Aug 26, 2025
dad323e
fix(touch): Stop and disable before deleting channel
P-R-O-C-H-Y Aug 26, 2025
70d0a88
ci: Test multiple touch reads
P-R-O-C-H-Y Aug 26, 2025
6b17726
Revert "ci: Test multiple touch reads"
P-R-O-C-H-Y Aug 26, 2025
d1ec9c8
ci: revert pytest ini config
P-R-O-C-H-Y Aug 26, 2025
03b5724
feat: Add install_libs function to handle library installation from c…
JakubAndrysek Aug 27, 2025
eac284b
fix: Update install_libs function to improve error handling and remov…
JakubAndrysek Aug 27, 2025
28904a9
fix(ci): Add verbose debug level to fix test
P-R-O-C-H-Y Aug 27, 2025
2a47244
fix(ble): matches the function signature with const u8*
SuGlider Aug 27, 2025
dfa7673
fix(ble): matches the function signature with const u8*
SuGlider Aug 27, 2025
d29b0df
fix(ble): matches the function signature with const u8*
SuGlider Aug 27, 2025
8dabc68
fix(ble): matches the function signature with const u8*
SuGlider Aug 27, 2025
d9cc33f
fix(ble): matches the function signature with const u8*
SuGlider Aug 27, 2025
08e23b2
Merge branch 'master' into ble-cleanup
SuGlider Aug 27, 2025
0dccd26
fix(touch): Commit copilot suggestions
P-R-O-C-H-Y Aug 27, 2025
69549c8
feat(http-client): add support for collecting all HTTP headers, close…
JakubAndrysek Aug 28, 2025
f801bdd
Merge branch 'master' into ble-cleanup
SuGlider Aug 28, 2025
cdc46c5
feat(zigbee): Update esp-zigbee-lib to newest
P-R-O-C-H-Y Aug 29, 2025
2578c56
Merge pull request #11772 from espressif/update-zigbee-sdk-1.6.7
me-no-dev Aug 29, 2025
6b91048
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Aug 29, 2025
098d4f3
Merge pull request #11751 from Kolcha/ble-cleanup
me-no-dev Aug 29, 2025
8ec6d47
Merge pull request #11766 from JakubAndrysek/ci/arduino-cli-lib-install
me-no-dev Aug 29, 2025
d673d26
Merge pull request #11643 from espressif/feat/touch-ng-all-socs
me-no-dev Aug 29, 2025
a2df766
refactor(CustomHeaders): replace USE_SERIAL with Serial for consistency
JakubAndrysek Aug 29, 2025
3bd54ba
Merge branch 'master' into http-client/collecting-headers
JakubAndrysek Sep 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
fi
fi

# Install libraries from ci.json if they exist
install_libs -ai "$ide_path" -s "$sketchdir"
install_result=$?
if [ $install_result -ne 0 ]; then
echo "ERROR: Library installation failed for $sketchname" >&2
exit $install_result
fi

ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
if [ -n "$ARDUINO_BUILD_DIR" ]; then
build_dir="$ARDUINO_BUILD_DIR"
Expand Down Expand Up @@ -580,13 +588,168 @@ function build_sketches { # build_sketches <ide_path> <user_path> <target> <path
return 0
}

# Return 0 if the string looks like a git URL we should pass to --git-url
is_git_like_url() {
local u=$1
[[ "$u" =~ ^https?://.+ ]] || [[ "$u" =~ ^git@[^:]+:.+ ]]
}

# If status!=0, print errors/warnings from captured output (fallback to full output)
print_err_warnings() {
local status=$1; shift
local out=$*
if [ "$status" -ne 0 ]; then
printf '%s\n' "$out" | grep -Ei "error|warning|warn" >&2 || printf '%s\n' "$out" >&2
fi
}

function install_libs { # install_libs <ide_path> <sketchdir> [-v]
local ide_path=""
local sketchdir=""
local verbose=false

while [ -n "$1" ]; do
case "$1" in
-ai ) shift; ide_path=$1 ;;
-s ) shift; sketchdir=$1 ;;
-v ) verbose=true ;;
* )
echo "ERROR: Unknown argument: $1" >&2
echo "USAGE: install_libs -ai <ide_path> -s <sketchdir> [-v]" >&2
return 1
;;
esac
shift
done

if [ -z "$ide_path" ]; then
echo "ERROR: IDE path not provided" >&2
echo "USAGE: install_libs -ai <ide_path> -s <sketchdir> [-v]" >&2
return 1
fi
if [ -z "$sketchdir" ]; then
echo "ERROR: Sketch directory not provided" >&2
echo "USAGE: install_libs -ai <ide_path> -s <sketchdir> [-v]" >&2
return 1
fi
if [ ! -f "$ide_path/arduino-cli" ]; then
echo "ERROR: arduino-cli not found at $ide_path/arduino-cli" >&2
return 1
fi

if [ ! -f "$sketchdir/ci.json" ]; then
[ "$verbose" = true ] && echo "No ci.json found in $sketchdir, skipping library installation"
return 0
fi
if ! jq -e . "$sketchdir/ci.json" >/dev/null 2>&1; then
echo "ERROR: $sketchdir/ci.json is not valid JSON" >&2
return 1
fi

local libs_type
libs_type=$(jq -r '.libs | type' "$sketchdir/ci.json" 2>/dev/null)
if [ -z "$libs_type" ] || [ "$libs_type" = "null" ]; then
[ "$verbose" = true ] && echo "No libs field found in ci.json, skipping library installation"
return 0
elif [ "$libs_type" != "array" ]; then
echo "ERROR: libs field in ci.json must be an array, found: $libs_type" >&2
return 1
fi

local libs_count
libs_count=$(jq -r '.libs | length' "$sketchdir/ci.json" 2>/dev/null)
if [ "$libs_count" -eq 0 ]; then
[ "$verbose" = true ] && echo "libs array is empty in ci.json, skipping library installation"
return 0
fi

echo "Installing $libs_count libraries from $sketchdir/ci.json"

local needs_unsafe=false
local original_unsafe_setting=""
local libs
libs=$(jq -r '.libs[]? // empty' "$sketchdir/ci.json")

# Detect any git-like URL (GitHub/GitLab/Bitbucket/self-hosted/ssh)
for lib in $libs; do
if is_git_like_url "$lib"; then
needs_unsafe=true
break
fi
done

if [ "$needs_unsafe" = true ]; then
[ "$verbose" = true ] && echo "Checking current unsafe install setting..."
original_unsafe_setting=$("$ide_path/arduino-cli" config get library.enable_unsafe_install 2>/dev/null || echo "false")
if [ "$original_unsafe_setting" = "false" ]; then
[ "$verbose" = true ] && echo "Enabling unsafe installs for Git URLs..."
"$ide_path/arduino-cli" config set library.enable_unsafe_install true >/dev/null 2>&1 || \
echo "WARNING: Failed to enable unsafe installs, Git URL installs may fail" >&2
else
[ "$verbose" = true ] && echo "Unsafe installs already enabled"
fi
fi

local rc=0 install_status=0 output=""
for lib in $libs; do
[ "$verbose" = true ] && echo "Processing library: $lib"

if is_git_like_url "$lib"; then
[ "$verbose" = true ] && echo "Installing library from git URL: $lib"
if [ "$verbose" = true ]; then
"$ide_path/arduino-cli" lib install --git-url "$lib"
install_status=$?
else
output=$("$ide_path/arduino-cli" lib install --git-url "$lib" 2>&1)
install_status=$?
fi
else
[ "$verbose" = true ] && echo "Installing library by name: $lib"
if [ "$verbose" = true ]; then
"$ide_path/arduino-cli" lib install "$lib"
install_status=$?
else
output=$("$ide_path/arduino-cli" lib install "$lib" 2>&1)
install_status=$?
fi
fi

# Treat "already installed"/"up to date" as success (idempotent)
if [ $install_status -ne 0 ] && echo "$output" | grep -qiE 'already installed|up to date'; then
install_status=0
fi

if [ "$verbose" != true ]; then
print_err_warnings "$install_status" "$output"
fi

if [ $install_status -ne 0 ]; then
echo "ERROR: Failed to install library: $lib" >&2
rc=$install_status
break
else
[ "$verbose" = true ] && echo "Successfully installed library: $lib"
fi
done

if [ "$needs_unsafe" = true ] && [ "$original_unsafe_setting" = "false" ]; then
[ "$verbose" = true ] && echo "Restoring original unsafe install setting..."
"$ide_path/arduino-cli" config set library.enable_unsafe_install false >/dev/null 2>&1 || true
fi

[ $rc -eq 0 ] && echo "Library installation completed"
return $rc
}


USAGE="
USAGE: ${0} [command] [options]
Available commands:
count: Count sketches.
build: Build a sketch.
chunk_build: Build a chunk of sketches.
check_requirements: Check if target meets sketch requirements.
install_libs: Install libraries from ci.json file.
"

cmd=$1
Expand All @@ -606,6 +769,8 @@ case "$cmd" in
;;
"check_requirements") check_requirements "$@"
;;
"install_libs") install_libs "$@"
;;
*)
echo "ERROR: Unrecognized command"
echo "$USAGE"
Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/tests_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ function run_test {
rm "$sketchdir"/diagram.json 2>/dev/null || true

result=0
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
printf "\n"
if [ $result -ne 0 ]; then
result=0
printf "\033[95mRetrying test: %s -- Config: %s\033[0m\n" "$sketchname" "$i"
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
printf "\033[95mpytest -s \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
bash -c "set +e; pytest -s \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
printf "\n"
if [ $result -ne 0 ]; then
printf "\033[91mFailed test: %s -- Config: %s\033[0m\n\n" "$sketchname" "$i"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThre
endif()
endif()

if(IDF_TARGET STREQUAL "esp32p4")
if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3" OR IDF_TARGET STREQUAL "esp32p4")
list(APPEND requires esp_driver_touch_sens)
endif()

Expand Down
Loading
Loading