Skip to content

Commit 362a81b

Browse files
authored
Merge branch 'master' into release/v2.x
2 parents f89df42 + 7e51a03 commit 362a81b

File tree

9 files changed

+152
-7
lines changed

9 files changed

+152
-7
lines changed

Diff for: .github/scripts/find_all_boards.sh

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Get all boards
4+
boards_array=()
5+
6+
for line in `grep '.tarch=' boards.txt`; do
7+
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
8+
boards_array+=("espressif:esp32:$board_name")
9+
echo "Added 'espressif:esp32:$board_name' to array"
10+
done
11+
12+
# Create JSON like string with all boards found and pass it to env variable
13+
board_count=${#boards_array[@]}
14+
echo "Boards found: $board_count"
15+
echo "BOARD-COUNT=$board_count" >> $GITHUB_ENV
16+
17+
if [ $board_count -gt 0 ]
18+
then
19+
json_matrix='['
20+
for board in ${boards_array[@]}
21+
do
22+
json_matrix+='"'$board'"'
23+
if [ $board_count -gt 1 ]
24+
then
25+
json_matrix+=","
26+
fi
27+
board_count=$(($board_count - 1))
28+
done
29+
json_matrix+=']'
30+
31+
echo $json_matrix
32+
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
33+
else
34+
echo "FQBNS=" >> $GITHUB_ENV
35+
fi

Diff for: .github/workflows/allboards.yml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Boards Test - Remote trigger
2+
3+
# The workflow will run on remote dispath with event-type set to "test-boards"
4+
on:
5+
repository_dispatch:
6+
types: [test-boards]
7+
8+
jobs:
9+
find-boards:
10+
runs-on: ubuntu-latest
11+
12+
outputs:
13+
fqbns: ${{ env.FQBNS }}
14+
board-count: ${{ env.BOARD-COUNT }}
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
ref: ${{ github.event.client_payload.branch }}
21+
22+
- name: Get boards fqbns
23+
run:
24+
bash .github/scripts/find_all_boards.sh
25+
26+
setup-chunks:
27+
needs: find-boards
28+
runs-on: ubuntu-latest
29+
if: needs.find-boards.outputs.fqbns != ''
30+
31+
outputs:
32+
test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }}
33+
34+
steps:
35+
- uses: actions/checkout@v3
36+
- run: npm install
37+
- name: Setup jq
38+
uses: dcarbone/[email protected]
39+
40+
- id: set-test-chunks
41+
name: Set Chunks
42+
run:
43+
echo "test-chunks<<EOF" >> $GITHUB_OUTPUT
44+
45+
echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT
46+
47+
echo "EOF" >> $GITHUB_OUTPUT
48+
49+
test-boards:
50+
needs: setup-chunks
51+
runs-on: ubuntu-latest
52+
53+
env:
54+
REPOSITORY: |
55+
- source-path: '.'
56+
name: "espressif:esp32"
57+
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }}
62+
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v3
66+
67+
- name: Echo FQBNS to file
68+
run:
69+
echo "$FQBN" > fqbns.json
70+
env:
71+
FQBN: ${{ toJSON(matrix.chunk) }}
72+
73+
- name: Compile sketch
74+
uses: P-R-O-C-H-Y/compile-sketches@main
75+
with:
76+
platforms: |
77+
${{ env.REPOSITORY }}
78+
multiple-fqbn: true
79+
multiple-fqbn-path: "fqbns.json"
80+
use-json-file: false
81+
enable-deltas-report: false
82+
enable-warnings-report: false
83+
cli-compile-flags: |
84+
- --warnings="all"
85+
sketch-paths:
86+
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"

Diff for: boards.txt

+2
Original file line numberDiff line numberDiff line change
@@ -7314,6 +7314,7 @@ dfrobot_beetle_esp32c3.menu.EraseFlash.all.upload.erase_cmd=-e
73147314
dfrobot_firebeetle2_esp32e.name=FireBeetle 2 ESP32-E
73157315

73167316
dfrobot_firebeetle2_esp32e.upload.tool=esptool_py
7317+
dfrobot_firebeetle2_esp32e.upload.tool.default=esptool_py
73177318
dfrobot_firebeetle2_esp32e.upload.maximum_size=1310720
73187319
dfrobot_firebeetle2_esp32e.upload.maximum_data_size=327680
73197320
dfrobot_firebeetle2_esp32e.upload.flags=
@@ -22259,6 +22260,7 @@ esp32c3m1IKit.menu.EraseFlash.all.upload.erase_cmd=-e
2225922260
roboheart_hercules.name=RoboHeart Hercules
2226022261

2226122262
roboheart_hercules.upload.tool=esptool_py
22263+
roboheart_hercules.upload.tool.default=esptool_py
2226222264
roboheart_hercules.upload.maximum_size=1310720
2226322265
roboheart_hercules.upload.maximum_data_size=327680
2226422266
roboheart_hercules.upload.wait_for_upload_port=true

Diff for: cores/esp32/WString.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// A pure abstract class forward used as a means to proide a unique pointer type
3535
// but really is never defined.
3636
class __FlashStringHelper;
37-
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
37+
#define FPSTR(str_pointer) (reinterpret_cast<const __FlashStringHelper *>(str_pointer))
3838
#define F(string_literal) (FPSTR(PSTR(string_literal)))
3939

4040
// An inherited class for holding the result of a concatenation. These

Diff for: docs/source/api/timer.rst

+15-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ This function is used to end timer.
4848
4949
* ``timer`` timer struct.
5050

51-
timerSetConfig
51+
timerGetConfig
5252
**************
5353

54-
This function is used to configure initialized timer (timerBegin() called).
54+
This function is used to get configuration of initialized timer (timerBegin() called).
5555

5656
.. code-block:: arduino
5757
@@ -62,6 +62,18 @@ This function is used to configure initialized timer (timerBegin() called).
6262
This function will return ``configuration`` as uint32_t number.
6363
This can be translated by inserting it to struct ``timer_cfg_t.val``.
6464

65+
timerSetConfig
66+
**************
67+
68+
This function is used to configure initialized timer (timerBegin() called).
69+
70+
.. code-block:: arduino
71+
72+
void timerSetConfig(hw_timer_t *timer, uint32_t config);
73+
74+
* ``timer`` timer struct.
75+
* ``config`` configuration as uint32_t number. Use configuration struct ``timer_cfg_t`` and pass ``timer_cfg_t.val`` as ``config`` paramater.
76+
6577
timerAttachInterrupt
6678
********************
6779

@@ -372,4 +384,4 @@ Repeat timer example:
372384
Watchdog timer example:
373385

374386
.. literalinclude:: ../../../libraries/ESP32/examples/Timer/WatchdogTimer/WatchdogTimer.ino
375-
:language: arduino
387+
:language: arduino

Diff for: docs/source/getting_started.rst

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ in the examples menu or inside each library folder.
133133

134134
https://github.com/espressif/arduino-esp32/tree/master/libraries
135135

136+
There is also a `list of examples <https://techtutorialsx.com/category/esp32/>`_ managed outside of Espressif, so check them out.
136137

137138
.. include:: common/datasheet.inc
138139

Diff for: libraries/ESPmDNS/src/ESPmDNS.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ MDNSResponder::~MDNSResponder() {
6060
end();
6161
}
6262

63-
bool MDNSResponder::begin(const char* hostName){
63+
bool MDNSResponder::begin(const String& hostName){
6464
if(mdns_init()){
6565
log_e("Failed starting MDNS");
6666
return false;
6767
}
6868
//WiFi.onEvent(_on_sys_event);
6969
_hostname = hostName;
7070
_hostname.toLowerCase();
71-
if(mdns_hostname_set(hostName)) {
71+
if(mdns_hostname_set(hostName.c_str())) {
7272
log_e("Failed setting MDNS hostname");
7373
return false;
7474
}

Diff for: libraries/ESPmDNS/src/ESPmDNS.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ class MDNSResponder {
5454
public:
5555
MDNSResponder();
5656
~MDNSResponder();
57-
bool begin(const char* hostName);
57+
bool begin(const String& hostName);
58+
bool begin(const char* hostName){
59+
return begin(String(hostName));
60+
}
5861
void end();
5962

6063
void setInstanceName(String name);

Diff for: libraries/WiFi/src/WiFiSTA.h

+6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ class WiFiSTAClass
4545
public:
4646

4747
wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
48+
wl_status_t begin(const String& wpa2_ssid, wpa2_auth_method_t method, const String& wpa2_identity = (const char*)NULL, const String& wpa2_username = (const char*)NULL, const String& wpa2_password = (const char*)NULL, const String& ca_pem = (const char*)NULL, const String& client_crt = (const char*)NULL, const String& client_key = (const char*)NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true) {
49+
return begin(wpa2_ssid.c_str(), method, wpa2_identity.c_str(), wpa2_username.c_str(), wpa2_password.c_str(), ca_pem.c_str(), client_crt.c_str(), client_key.c_str(), channel, bssid, connect);
50+
}
4851
wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
52+
wl_status_t begin(const String& ssid, const String& passphrase = (const char*)NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true) {
53+
return begin(ssid.c_str(), passphrase.c_str(), channel, bssid, connect);
54+
}
4955
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
5056
wl_status_t begin();
5157

0 commit comments

Comments
 (0)