Skip to content

Commit

Permalink
Upstream changes (#564)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
11 people authored Dec 11, 2024
1 parent 0be6ca1 commit 2c87943
Show file tree
Hide file tree
Showing 100 changed files with 2,371 additions and 1,843 deletions.
26 changes: 13 additions & 13 deletions .github/ISSUE_TEMPLATE/Issue-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
* Please check [Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html)
* Take a look on [Troubleshooting guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
* If still experiencing the issue, please provide as many details as possible below about your hardware, computer setup and code.
Expand All @@ -24,7 +24,7 @@ body:
description: What development board or other hardware is the chip attached to?
placeholder: ex. DevKitC, plain module on breadboard, etc. If your hardware is custom or unusual, please attach a photo.
validations:
required: true
required: true
- type: textarea
id: other-hw
attributes:
Expand Down Expand Up @@ -60,7 +60,7 @@ body:
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
Expand All @@ -75,9 +75,9 @@ body:
attributes:
label: IDE Name
description: What IDE are you using?
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
placeholder: eg. Arduino IDE, VSCode, Sloeber...
validations:
required: true
required: true
- type: input
id: os
attributes:
Expand All @@ -95,13 +95,13 @@ body:
validations:
required: true
- type: dropdown
id: PSRAM
id: PSRAM
attributes:
label: PSRAM enabled
description: Is PSRAM enabled?
options:
- 'yes'
- 'no'
- "yes"
- "no"
validations:
required: true
- type: input
Expand All @@ -116,8 +116,8 @@ body:
id: Description
attributes:
label: Description
description: Please describe your problem here and expected behaviour
placeholder: ex. Can't connect/weird behaviour/wrong function/missing parameter..
description: Please describe your problem here and expected behavior
placeholder: ex. Can't connect/weird behavior/wrong function/missing parameter..
validations:
required: true
- type: textarea
Expand All @@ -128,7 +128,7 @@ body:
placeholder: ex. Related part of the code to replicate the issue
render: cpp
validations:
required: true
required: true
- type: textarea
id: Debug
attributes:
Expand All @@ -137,11 +137,11 @@ body:
placeholder: Enable Core debug level - Debug on tools menu of Arduino IDE, then put the serial output here.
render: plain
validations:
required: true
required: true
- type: textarea
id: other-remarks
attributes:
label: Other Steps to Reproduce
label: Other Steps to Reproduce
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.
placeholder: ex. I also tried on other OS, HW...it works correctly on that setup.
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ contact_links:
about: Community channel for questions and help
- name: ESP32 Forum - Arduino
url: https://esp32.com/viewforum.php?f=19
about: Official Forum for questions
about: Official Forum for questions
5 changes: 3 additions & 2 deletions .github/scripts/check-cmakelists.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

#
# This script is used in the CI workflow. It checks all non-examples source files in libraries/ and cores/ are listed in
# CMakeLists.txt for the cmake-based IDF component
Expand All @@ -12,10 +13,10 @@ set -e
git submodule update --init --recursive

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

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

if ! diff -u0 --label "Repo Files" --label "srcs" <(echo "$REPO_SRCS") <(echo "$CMAKE_SRCS"); then
echo "Source files in repo (-) and source files in CMakeLists.txt (+) don't match"
Expand Down
25 changes: 12 additions & 13 deletions .github/scripts/find_all_boards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# Get all boards
boards_array=()

for line in `grep '.tarch=' boards.txt`; do
boards_list=$(grep '.tarch=' boards.txt)

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

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

if [ $board_count -gt 0 ]
then
if [ "$board_count" -gt 0 ]; then
json_matrix='['
for board in ${boards_array[@]}
do
for board in "${boards_array[@]}"; do
json_matrix+='"'$board'"'
if [ $board_count -gt 1 ]
then
if [ "$board_count" -gt 1 ]; then
json_matrix+=","
fi
board_count=$(($board_count - 1))
board_count=$((board_count - 1))
done
json_matrix+=']'

echo $json_matrix
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
echo "$json_matrix"
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
else
echo "FQBNS=" >> $GITHUB_ENV
echo "FQBNS=" >> "$GITHUB_ENV"
fi
37 changes: 15 additions & 22 deletions .github/scripts/find_new_boards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ owner_repository=$1
base_ref=$2

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

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

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

# Print the modified lines for debugging
# Print the modified lines for debugging
echo "Modified lines:"
echo "$modified_lines"

boards_array=()
previous_board=""

# Extract board names from the modified lines, and add them to the boards_array
while read -r line
do
while read -r line; do
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
# remove + or - from the board name at the beginning
board_name=$(echo "$board_name" | sed 's/^[+-]//')
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]
then
if [ "$board_name" != "$previous_board" ]
then
board_name=${board_name#[-+]}
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]; then
if [ "$board_name" != "$previous_board" ]; then
boards_array+=("espressif:esp32:$board_name")
previous_board="$board_name"
echo "Added 'espressif:esp32:$board_name' to array"
Expand All @@ -48,22 +44,19 @@ done <<< "$modified_lines"
# Create JSON like string with all boards found and pass it to env variable
board_count=${#boards_array[@]}

if [ $board_count -gt 0 ]
then
if [ "$board_count" -gt 0 ]; then
json_matrix='{"fqbn": ['
for board in ${boards_array[@]}
do
for board in "${boards_array[@]}"; do
json_matrix+='"'$board'"'
if [ $board_count -gt 1 ]
then
if [ "$board_count" -gt 1 ]; then
json_matrix+=","
fi
board_count=$(($board_count - 1))
board_count=$((board_count - 1))
done
json_matrix+=']}'

echo $json_matrix
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
echo "$json_matrix"
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
else
echo "FQBNS=" >> $GITHUB_ENV
fi
echo "FQBNS=" >> "$GITHUB_ENV"
fi
3 changes: 1 addition & 2 deletions .github/scripts/install-arduino-cli.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

14 changes: 7 additions & 7 deletions .github/scripts/install-arduino-core-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
echo "Installing ESP32 Arduino Core ..."
script_init_path="$PWD"
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
cd "$ARDUINO_USR_PATH/hardware/espressif"
cd "$ARDUINO_USR_PATH/hardware/espressif" || exit

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

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

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

echo "Installing Platform Tools ..."
if [ "$OS_IS_WINDOWS" == "1" ]; then
cd tools && ./get.exe
cd tools && ./get.exe
else
cd tools && python get.py
cd tools && python get.py
fi
cd $script_init_path
cd "$script_init_path" || exit

echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
echo ""
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/install-arduino-ide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#OSTYPE: 'msys', ARCH: 'x86_64' => win32
#OSTYPE: 'darwin18', ARCH: 'i386' => macos

OSBITS=`uname -m`
OSBITS=$(uname -m)
if [[ "$OSTYPE" == "linux"* ]]; then
export OS_IS_LINUX="1"
ARCHIVE_FORMAT="tar.xz"
Expand Down Expand Up @@ -77,4 +77,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then
echo "Arduino IDE Installed in '$ARDUINO_IDE_PATH'"
echo ""
fi

Loading

0 comments on commit 2c87943

Please sign in to comment.