Skip to content

Commit 7312de3

Browse files
authored
Merge branch 'master' into feature/zigbee-library
2 parents 7693a16 + 0b8eede commit 7312de3

File tree

8 files changed

+59
-46
lines changed

8 files changed

+59
-46
lines changed

.github/scripts/on-push.sh

+12-20
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ export ARDUINO_BUILD_DIR="$HOME/.arduino/build.tmp"
66

77
function build(){
88
local target=$1
9-
local fqbn=$2
10-
local chunk_index=$3
11-
local chunks_cnt=$4
12-
local build_log=$5
13-
local sketches_file=$6
14-
shift; shift; shift; shift; shift; shift;
9+
local chunk_index=$2
10+
local chunks_cnt=$3
11+
local build_log=$4
12+
local sketches_file=$5
13+
shift; shift; shift; shift; shift;
1514
local sketches=$*
1615

1716
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
1817
local BUILD_SKETCHES="${SCRIPTS_DIR}/sketch_utils.sh chunk_build"
1918

2019
local args="-ai $ARDUINO_IDE_PATH -au $ARDUINO_USR_PATH"
2120

22-
args+=" -t $target -fqbn $fqbn"
21+
args+=" -t $target"
2322

2423
if [ "$OS_IS_LINUX" == "1" ]; then
2524
args+=" -p $ARDUINO_ESP32_PATH/libraries"
@@ -77,13 +76,6 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7776
source ${SCRIPTS_DIR}/install-arduino-cli.sh
7877
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
7978

80-
FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
81-
FQBN_ESP32S2="espressif:esp32:esp32s2:PSRAM=enabled,PartitionScheme=huge_app"
82-
FQBN_ESP32S3="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
83-
FQBN_ESP32C3="espressif:esp32:esp32c3:PartitionScheme=huge_app"
84-
FQBN_ESP32C6="espressif:esp32:esp32c6:PartitionScheme=huge_app"
85-
FQBN_ESP32H2="espressif:esp32:esp32h2:PartitionScheme=huge_app"
86-
8779
SKETCHES_ESP32="\
8880
$ARDUINO_ESP32_PATH/libraries/NetworkClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
8981
$ARDUINO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino\
@@ -99,12 +91,12 @@ if [ "$BUILD_PIO" -eq 0 ]; then
9991
fi
10092

10193
#build sketches for different targets
102-
build "esp32s3" $FQBN_ESP32S3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
103-
build "esp32s2" $FQBN_ESP32S2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
104-
build "esp32c3" $FQBN_ESP32C3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
105-
build "esp32c6" $FQBN_ESP32C6 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
106-
build "esp32h2" $FQBN_ESP32H2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
107-
build "esp32" $FQBN_ESP32 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
94+
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
95+
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
96+
build "esp32c3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
97+
build "esp32c6" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
98+
build "esp32h2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
99+
build "esp32" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
108100

109101
if [ "$BUILD_LOG" -eq 1 ]; then
110102
#remove last comma from the last JSON object

.github/workflows/docs_deploy.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Documentation Build and Production Deploy CI
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_run:
5+
workflows: ["ESP32 Arduino Release"]
6+
types:
7+
- completed
68
push:
79
branches:
810
- release/v2.x
@@ -12,14 +14,18 @@ on:
1214
- '.github/workflows/docs_deploy.yml'
1315

1416
jobs:
15-
1617
deploy-prod-docs:
1718
name: Deploy Documentation on Production
1819
runs-on: ubuntu-22.04
1920
defaults:
2021
run:
2122
shell: bash
2223
steps:
24+
- name: Check if release workflow is successful
25+
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' }}
26+
run: |
27+
echo "Release workflow failed. Exiting..."
28+
exit 1
2329
- uses: actions/checkout@v4
2430
with:
2531
submodules: true
+27-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
11
name: Push components to https://components.espressif.com
2+
23
on:
3-
push:
4-
tags:
5-
- '*'
4+
workflow_run:
5+
workflows: ["ESP32 Arduino Release"]
6+
types:
7+
- completed
8+
69
jobs:
710
upload_components:
811
runs-on: ubuntu-latest
912
steps:
13+
- name: Get the release tag
14+
run: |
15+
if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
16+
echo "Release workflow failed. Exiting..."
17+
exit 1
18+
fi
19+
20+
branch=${{ github.event.workflow_run.head_branch }}
21+
if [[ $branch == refs/tags/* ]]; then
22+
tag="${branch#refs/tags/}"
23+
elif [[ $branch =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
24+
tag=$branch
25+
else
26+
echo "Tag not found in $branch. Exiting..."
27+
exit 1
28+
fi
29+
30+
echo "Tag: $tag"
31+
echo "RELEASE_TAG=$tag" >> $GITHUB_ENV
32+
1033
- uses: actions/checkout@v4
1134
with:
1235
submodules: "recursive"
@@ -15,6 +38,6 @@ jobs:
1538
uses: espressif/upload-components-ci-action@v1
1639
with:
1740
name: arduino-esp32
18-
version: ${{ github.ref_name }}
41+
version: ${{ env.RELEASE_TAG }}
1942
namespace: espressif
2043
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}

libraries/FFat/src/FFat.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,4 @@ size_t F_Fat::freeBytes() {
152152
return free_sect * sect_size;
153153
}
154154

155-
bool F_Fat::exists(const char *path) {
156-
File f = open(path, "r", false);
157-
return (f == true) && !f.isDirectory();
158-
}
159-
160-
bool F_Fat::exists(const String &path) {
161-
return exists(path.c_str());
162-
}
163-
164155
F_Fat FFat = F_Fat(FSImplPtr(new VFSImpl()));

libraries/FFat/src/FFat.h

-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class F_Fat : public FS {
3232
size_t usedBytes();
3333
size_t freeBytes();
3434
void end();
35-
bool exists(const char *path);
36-
bool exists(const String &path);
3735

3836
private:
3937
wl_handle_t _wl_handle = WL_INVALID_HANDLE;

libraries/HTTPClient/src/HTTPClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void HTTPClient::disconnect(bool preserveClient) {
371371
if (connected()) {
372372
if (_client->available() > 0) {
373373
log_d("still data in buffer (%d), clean up.\n", _client->available());
374-
_client->flush();
374+
_client->clear();
375375
}
376376

377377
if (_reuse && _canReuse) {

libraries/LittleFS/src/LittleFS.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ class LittleFSImpl : public VFSImpl {
3333
public:
3434
LittleFSImpl();
3535
virtual ~LittleFSImpl() {}
36-
virtual bool exists(const char *path);
3736
};
3837

3938
LittleFSImpl::LittleFSImpl() {}
4039

41-
bool LittleFSImpl::exists(const char *path) {
42-
File f = open(path, "r", false);
43-
return (f == true);
44-
}
45-
4640
LittleFSFS::LittleFSFS() : FS(FSImplPtr(new LittleFSImpl())), partitionLabel_(NULL) {}
4741

4842
LittleFSFS::~LittleFSFS() {

libraries/PPP/src/PPP.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,17 @@ bool PPPClass::begin(ppp_modem_model_t model, uint8_t uart_num, int baud_rate) {
324324
} else {
325325
// try to communicate with the modem
326326
if (esp_modem_sync(_dce) != ESP_OK) {
327-
log_v("Modem does not respond to AT, maybe in DATA mode? ...exiting network mode");
327+
log_v("Modem does not respond to AT! Switching to COMMAND mode.");
328328
esp_modem_set_mode(_dce, ESP_MODEM_MODE_COMMAND);
329+
if (esp_modem_sync(_dce) != ESP_OK) {
330+
log_v("Modem does not respond to AT! Switching to CMUX mode.");
331+
if (esp_modem_set_mode(_dce, ESP_MODEM_MODE_CMUX) != ESP_OK) {
332+
log_v("Modem failed to switch to CMUX mode!");
333+
} else {
334+
log_v("Switching back to COMMAND mode");
335+
esp_modem_set_mode(_dce, ESP_MODEM_MODE_COMMAND);
336+
}
337+
}
329338
if (esp_modem_sync(_dce) != ESP_OK) {
330339
log_e("Modem failed to respond to AT!");
331340
goto err;

0 commit comments

Comments
 (0)