Skip to content

Commit 2c87943

Browse files
Jason2866SuGliderP-R-O-C-H-Yme-no-devpre-commit-ci-lite[bot]
authored
Upstream changes (#564)
* fix(zigbee): Increase timeout, commision again on failure + setScanDuration (espressif#10651) * fix(zigbee): Increase timeout, commision again on failure * fix(zigbee): Update library keywords * feat(Matter): add new MatterColorLight endpoint (espressif#10654) * feat(matter): adds Matter Color Light endpoint * feat(matter): New example => Wifi Prov within Matter as alternative for wireless network provisioning (espressif#10658) * feat(matter): Arduino WiFi Prov example for Matter * feat(matter): Adds Matter Enhanced Color Light Endpoint (CW/WW/RGB) (espressif#10657) * feat(matter): created enhanced color light new matter endpoint and example * feat(matter): Adds a new Matter Endpoint: Generic Switch (smart button) (espressif#10662) * feat(matter): adds new matter generic switch endpoint * fix(matter): no need of arduino preferences here * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> * BLECharacteristic optimization (espressif#10665) * BLECharacteristic::notify() optimization GeneralUtils::hexDump() doesn't output anything if the log level is not "VERBOSE". Additionally, it is very CPU intensive, even when it doesn't output anything. So it is much better to *not* call it at all if not needed. In a simple program which calls BLECharacteristic::notify() every 50 ms, the performance gain of this little optimization is 37% in release mode (-O3) and 57% in debug mode. Of course, the "#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE" guard could also be put inside the GeneralUtils::hexDump() function itself. But it's better to put it here also, as it is clearer (indicating a verbose log thing) and it allows to remove the "m_value.getValue().c_str()" call, which is in itself quite CPU intensive. * BLECharacteristic optimization Calls to BLEUtils::buildHexData() don't output anything when the log level is not "VERBOSE" or "DEBUG". As this function is quite CPU intensive, it is better to not call it when not needed. * Remove 3rd party references in code and documentation (espressif#10666) * feat(support): documentation adjustment * feat(support): readme files, commentaries and examples * fix(template): Fix Issue Report Template ----------------------------- Co-authored-by: Lucas Saavedra Vaz <[email protected]> * Tasmota changes * optional Ethernet support (JL1101 driver added) * esp-modem only esp32, esp32s2 and esp32s3 * remove `OpenThread` * remove all BT BLE libraries * remove zigbee * remove SPIFFS * remove Client Secure * remove Provisioning * remove TfLite, Insights and Rainmaker * make GPIOViewer working see arendst/Tasmota@9696118 * remove FS log which is just littering * refactor(uart): Refactor UART test to work with any number of UARTs (espressif#10593) * refactor(uart): Refactor UART test to work with any number of UARTs Co-authored-by: Rodrigo Garcia <[email protected]> * fix(uart): Set CPU freq on ESP32 * ci(pre-commit): Apply automatic fixes * fix(spelling): Fix codespell error --------- Co-authored-by: Rodrigo Garcia <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> * feat (Variants) Added custom boards variants GLYPH C3, GLYPHC6 & GLYPHH2 (espressif#10671) * Added custom boards GLYPH C3, GLYPHC6 & GLYPHH2 based on ESP32C3, ESP32C6 & ESP32H2 * feat(Variants) : Added custom boards GLYPH C3, GLYPHC6 & GLYPHH2 Added custom boards variants from PCBCUPID - GLYPH C3, GLYPHC6 & GLYPHH2 based on ESP32C3, ESP32C6 & ESP32H2 * added required fix : moved the variants to end and fixed build.board * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: srini <[email protected]> Co-authored-by: Jan Procházka <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> * feat(Zigbee): Recall bounded devices after reboot + IEEE address option for commands (espressif#10676) * feat(zigbee): Recall bound devices after reboot * fix(zigbee): Add missing locks + allow printBoundDevices to Serial * fix(Zigbee): Add locks to temp sensor setReporting * fix(Zigbee): remove unnecessary space in formatting * fix(Zigbee): proper parameter in printBoundDevices * feat(Zigbee): factory reset when removed from network * fix(zigbee): Update comment * fix(zigbee): fix serial and add missing factoryReset to example * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> * ci(pre-commit): Bump hooks versions and fix leftover files (espressif#10680) * update(hooks): Bump pre-commit hooks versions * fix(formatting): Fix python script formatting * fix(formatting): Fix leftover files on protected folders * feat(Matter): Creates New Matter Fan Controller Endpoint (espressif#10691) * feat(matter): creates new matter fan controller endpoint * change(tools): Push generated binaries to PR * ci(pre-commit): Add bash script formatter and linter (espressif#10681) * ci(pre-commit): Add check for bash scripts * fix(formatting): Fix bash scripts * docs(pre-commit): Add info about the included hooks * fix ESP32-U4WDH chip detection by ESP.getChipModel() (espressif#10696) * fixes chip detection for ESP32-U4WDH * fix(push): Re-comment unused code * feat(matter): adds new Temperature Sensor Matter Endpoint (espressif#10698) * feat(matter): adds new temperature sensor matter endpoint * feat(matter): commentaries review and fixes * feat(matter): commentaries review and fixes * feat(matter): commentaries review and fixes * feat(matter): commentaries review and fixes * feat(matter): commentaries review and fixes * feat(matter): commentaries review and fixes * feat(matter): general commentaries and code review * feat(matter): keeping arduino style for local variables (lower case) * feat(matter): applies a generic temperature unit to the implementation and example * fix(matter): fixed problem with begin(float) implementation * fix(matter): fixed begin(float) initiallization * feat(matter): updated matter temperature keywords with new api * ci(pre-commit): Apply automatic fixes * fix(matter): fixed code spell ci errors in matter temperature sensor --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> * feat(chip): Add definition for BOOT_PIN for all chips (espressif#10700) * feat(chip): Add definition for BOOT_PIN for all chips For use in sketches as default button * fix(core): Make BOOT_PIN static * fix(hal): BOOT_PIN should always be defined * feat(Matter): Adds New Matter Humidity Sensor Endpoint (espressif#10703) * feat(matter): adds matter humidity sensor endpoint * Update and rename platformio-build.py to pioarduino-build.py * feat(matter_examples): apply boot button change to all examples (espressif#10702) * feat(matter_examples): apply boot button change to all examples * ci(tests): Re-enable UART test for P4 * Delete libraries/Matter directory --------- Co-authored-by: Rodrigo Garcia <[email protected]> Co-authored-by: Jan Procházka <[email protected]> Co-authored-by: Me No Dev <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Sylvain Quendez <[email protected]> Co-authored-by: Lucas Saavedra Vaz <[email protected]> Co-authored-by: PCB CUPID <[email protected]> Co-authored-by: srini <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Stegen <[email protected]>
1 parent 0be6ca1 commit 2c87943

File tree

100 files changed

+2371
-1843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2371
-1843
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
8+
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
99
* Please check [Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html)
1010
* Take a look on [Troubleshooting guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
1111
* If still experiencing the issue, please provide as many details as possible below about your hardware, computer setup and code.
@@ -24,7 +24,7 @@ body:
2424
description: What development board or other hardware is the chip attached to?
2525
placeholder: ex. DevKitC, plain module on breadboard, etc. If your hardware is custom or unusual, please attach a photo.
2626
validations:
27-
required: true
27+
required: true
2828
- type: textarea
2929
id: other-hw
3030
attributes:
@@ -60,7 +60,7 @@ body:
6060
- v2.0.8
6161
- v2.0.7
6262
- v2.0.6
63-
- v2.0.5
63+
- v2.0.5
6464
- v2.0.4
6565
- v2.0.3
6666
- v2.0.2
@@ -75,9 +75,9 @@ body:
7575
attributes:
7676
label: IDE Name
7777
description: What IDE are you using?
78-
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
78+
placeholder: eg. Arduino IDE, VSCode, Sloeber...
7979
validations:
80-
required: true
80+
required: true
8181
- type: input
8282
id: os
8383
attributes:
@@ -95,13 +95,13 @@ body:
9595
validations:
9696
required: true
9797
- type: dropdown
98-
id: PSRAM
98+
id: PSRAM
9999
attributes:
100100
label: PSRAM enabled
101101
description: Is PSRAM enabled?
102102
options:
103-
- 'yes'
104-
- 'no'
103+
- "yes"
104+
- "no"
105105
validations:
106106
required: true
107107
- type: input
@@ -116,8 +116,8 @@ body:
116116
id: Description
117117
attributes:
118118
label: Description
119-
description: Please describe your problem here and expected behaviour
120-
placeholder: ex. Can't connect/weird behaviour/wrong function/missing parameter..
119+
description: Please describe your problem here and expected behavior
120+
placeholder: ex. Can't connect/weird behavior/wrong function/missing parameter..
121121
validations:
122122
required: true
123123
- type: textarea
@@ -128,7 +128,7 @@ body:
128128
placeholder: ex. Related part of the code to replicate the issue
129129
render: cpp
130130
validations:
131-
required: true
131+
required: true
132132
- type: textarea
133133
id: Debug
134134
attributes:
@@ -137,11 +137,11 @@ body:
137137
placeholder: Enable Core debug level - Debug on tools menu of Arduino IDE, then put the serial output here.
138138
render: plain
139139
validations:
140-
required: true
140+
required: true
141141
- type: textarea
142142
id: other-remarks
143143
attributes:
144-
label: Other Steps to Reproduce
144+
label: Other Steps to Reproduce
145145
description: Is there any other information you can think of which will help us reproduce this problem? Any additional info can be added as well.
146146
placeholder: ex. I also tried on other OS, HW...it works correctly on that setup.
147147
- type: checkboxes

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ contact_links:
55
about: Community channel for questions and help
66
- name: ESP32 Forum - Arduino
77
url: https://esp32.com/viewforum.php?f=19
8-
about: Official Forum for questions
8+
about: Official Forum for questions

.github/scripts/check-cmakelists.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
#
34
# This script is used in the CI workflow. It checks all non-examples source files in libraries/ and cores/ are listed in
45
# CMakeLists.txt for the cmake-based IDF component
@@ -12,10 +13,10 @@ set -e
1213
git submodule update --init --recursive
1314

1415
# find all source files in repo
15-
REPO_SRCS=`find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort`
16+
REPO_SRCS=$(find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort)
1617

1718
# find all source files named in CMakeLists.txt COMPONENT_SRCS
18-
CMAKE_SRCS=`cmake --trace-expand -P CMakeLists.txt 2>&1 | grep set\(srcs | cut -d'(' -f3 | sed 's/ )//' | sed 's/srcs //' | tr ' ;' '\n' | sort`
19+
CMAKE_SRCS=$(cmake --trace-expand -P CMakeLists.txt 2>&1 | grep set\(srcs | cut -d'(' -f3 | sed 's/ )//' | sed 's/srcs //' | tr ' ;' '\n' | sort)
1920

2021
if ! diff -u0 --label "Repo Files" --label "srcs" <(echo "$REPO_SRCS") <(echo "$CMAKE_SRCS"); then
2122
echo "Source files in repo (-) and source files in CMakeLists.txt (+) don't match"

.github/scripts/find_all_boards.sh

+12-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Get all boards
44
boards_array=()
55

6-
for line in `grep '.tarch=' boards.txt`; do
6+
boards_list=$(grep '.tarch=' boards.txt)
7+
8+
while read -r line; do
79
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
810
# skip esp32c2 as we dont build libs for it
911
if [ "$board_name" == "esp32c2" ]; then
@@ -12,29 +14,26 @@ for line in `grep '.tarch=' boards.txt`; do
1214
fi
1315
boards_array+=("espressif:esp32:$board_name")
1416
echo "Added 'espressif:esp32:$board_name' to array"
15-
done
17+
done <<< "$boards_list"
1618

1719
# Create JSON like string with all boards found and pass it to env variable
1820
board_count=${#boards_array[@]}
1921
echo "Boards found: $board_count"
20-
echo "BOARD-COUNT=$board_count" >> $GITHUB_ENV
22+
echo "BOARD-COUNT=$board_count" >> "$GITHUB_ENV"
2123

22-
if [ $board_count -gt 0 ]
23-
then
24+
if [ "$board_count" -gt 0 ]; then
2425
json_matrix='['
25-
for board in ${boards_array[@]}
26-
do
26+
for board in "${boards_array[@]}"; do
2727
json_matrix+='"'$board'"'
28-
if [ $board_count -gt 1 ]
29-
then
28+
if [ "$board_count" -gt 1 ]; then
3029
json_matrix+=","
3130
fi
32-
board_count=$(($board_count - 1))
31+
board_count=$((board_count - 1))
3332
done
3433
json_matrix+=']'
3534

36-
echo $json_matrix
37-
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
35+
echo "$json_matrix"
36+
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
3837
else
39-
echo "FQBNS=" >> $GITHUB_ENV
38+
echo "FQBNS=" >> "$GITHUB_ENV"
4039
fi

.github/scripts/find_new_boards.sh

+15-22
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ owner_repository=$1
55
base_ref=$2
66

77
# Download the boards.txt file from the base branch
8-
curl -L -o boards_base.txt https://raw.githubusercontent.com/$owner_repository/$base_ref/boards.txt
8+
curl -L -o boards_base.txt https://raw.githubusercontent.com/"$owner_repository"/"$base_ref"/boards.txt
99

1010
# Compare boards.txt file in the repo with the modified file from PR
1111
diff=$(diff -u boards_base.txt boards.txt)
1212

1313
# Check if the diff is empty
14-
if [ -z "$diff" ]
15-
then
14+
if [ -z "$diff" ]; then
1615
echo "No changes in boards.txt file"
1716
echo "FQBNS="
1817
exit 0
@@ -21,23 +20,20 @@ fi
2120
# Extract added or modified lines (lines starting with '+' or '-')
2221
modified_lines=$(echo "$diff" | grep -E '^[+-][^+-]')
2322

24-
# Print the modified lines for debugging
23+
# Print the modified lines for debugging
2524
echo "Modified lines:"
2625
echo "$modified_lines"
2726

2827
boards_array=()
2928
previous_board=""
3029

3130
# Extract board names from the modified lines, and add them to the boards_array
32-
while read -r line
33-
do
31+
while read -r line; do
3432
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
3533
# remove + or - from the board name at the beginning
36-
board_name=$(echo "$board_name" | sed 's/^[+-]//')
37-
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]
38-
then
39-
if [ "$board_name" != "$previous_board" ]
40-
then
34+
board_name=${board_name#[-+]}
35+
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]; then
36+
if [ "$board_name" != "$previous_board" ]; then
4137
boards_array+=("espressif:esp32:$board_name")
4238
previous_board="$board_name"
4339
echo "Added 'espressif:esp32:$board_name' to array"
@@ -48,22 +44,19 @@ done <<< "$modified_lines"
4844
# Create JSON like string with all boards found and pass it to env variable
4945
board_count=${#boards_array[@]}
5046

51-
if [ $board_count -gt 0 ]
52-
then
47+
if [ "$board_count" -gt 0 ]; then
5348
json_matrix='{"fqbn": ['
54-
for board in ${boards_array[@]}
55-
do
49+
for board in "${boards_array[@]}"; do
5650
json_matrix+='"'$board'"'
57-
if [ $board_count -gt 1 ]
58-
then
51+
if [ "$board_count" -gt 1 ]; then
5952
json_matrix+=","
6053
fi
61-
board_count=$(($board_count - 1))
54+
board_count=$((board_count - 1))
6255
done
6356
json_matrix+=']}'
6457

65-
echo $json_matrix
66-
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
58+
echo "$json_matrix"
59+
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
6760
else
68-
echo "FQBNS=" >> $GITHUB_ENV
69-
fi
61+
echo "FQBNS=" >> "$GITHUB_ENV"
62+
fi

.github/scripts/install-arduino-cli.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OSBITS=`uname -m`
3+
OSBITS=$(uname -m)
44
if [[ "$OSTYPE" == "linux"* ]]; then
55
export OS_IS_LINUX="1"
66
if [[ "$OSBITS" == "i686" ]]; then
@@ -49,4 +49,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; the
4949
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
5050
fi
5151
fi
52-

.github/scripts/install-arduino-core-esp32.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
55
echo "Installing ESP32 Arduino Core ..."
66
script_init_path="$PWD"
77
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
8-
cd "$ARDUINO_USR_PATH/hardware/espressif"
8+
cd "$ARDUINO_USR_PATH/hardware/espressif" || exit
99

1010
echo "Installing Python Serial ..."
1111
pip install pyserial > /dev/null
@@ -15,25 +15,25 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
1515
pip install requests > /dev/null
1616
fi
1717

18-
if [ ! -z "$GITHUB_REPOSITORY" ]; then
18+
if [ -n "$GITHUB_REPOSITORY" ]; then
1919
echo "Linking Core..."
20-
ln -s $GITHUB_WORKSPACE esp32
20+
ln -s "$GITHUB_WORKSPACE" esp32
2121
else
2222
echo "Cloning Core Repository..."
2323
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
2424
fi
2525

2626
#echo "Updating Submodules ..."
27-
cd esp32
27+
cd esp32 || exit
2828
#git submodule update --init --recursive > /dev/null 2>&1
2929

3030
echo "Installing Platform Tools ..."
3131
if [ "$OS_IS_WINDOWS" == "1" ]; then
32-
cd tools && ./get.exe
32+
cd tools && ./get.exe
3333
else
34-
cd tools && python get.py
34+
cd tools && python get.py
3535
fi
36-
cd $script_init_path
36+
cd "$script_init_path" || exit
3737

3838
echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
3939
echo ""

.github/scripts/install-arduino-ide.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#OSTYPE: 'msys', ARCH: 'x86_64' => win32
55
#OSTYPE: 'darwin18', ARCH: 'i386' => macos
66

7-
OSBITS=`uname -m`
7+
OSBITS=$(uname -m)
88
if [[ "$OSTYPE" == "linux"* ]]; then
99
export OS_IS_LINUX="1"
1010
ARCHIVE_FORMAT="tar.xz"
@@ -77,4 +77,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then
7777
echo "Arduino IDE Installed in '$ARDUINO_IDE_PATH'"
7878
echo ""
7979
fi
80-

0 commit comments

Comments
 (0)