Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2928654

Browse files
change(idf): Rename component example and fix compilation warnings (#9801)
* change(idf): Rename component example * ci(push): Fix steps conditions * ci(tests): Remove unnecessary concurrency * ci(push): Fix step condition * fix(idf): Fix compilation warnings when as component
1 parent e3fedc5 commit 2928654

File tree

15 files changed

+15
-31
lines changed

15 files changed

+15
-31
lines changed

‎.github/workflows/build_tests.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
description: 'Chip to build tests for'
1313
required: true
1414

15-
concurrency:
16-
group: tests-build-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
17-
cancel-in-progress: true
18-
1915
jobs:
2016
build-tests:
2117
name: Build ${{ inputs.type }} tests for ${{ inputs.chip }}

‎.github/workflows/hw.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
description: 'Chip to run tests for'
1313
required: true
1414

15-
concurrency:
16-
group: tests-hw-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
17-
cancel-in-progress: true
18-
1915
jobs:
2016
hardware-test:
2117
name: Hardware ${{ inputs.chip }} ${{ inputs.type }} tests

‎.github/workflows/push.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
echo "chunks=$chunks" >> $GITHUB_OUTPUT
172172
173173
- name: Upload sketches found
174-
if: ${{ steps.set-chunks.outputs.build_all == 'false' }}
174+
if: ${{ steps.set-chunks.outputs.build_all == 'false' && steps.set-chunks.outputs.build_libraries == 'true' }}
175175
uses: actions/upload-artifact@v4
176176
with:
177177
name: sketches_found
@@ -214,13 +214,13 @@ jobs:
214214
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ env.MAX_CHUNKS }} 1
215215

216216
- name: Download sketches found
217-
if: ${{ needs.gen-chunks.outputs.build_all == 'false' }}
217+
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
218218
uses: actions/download-artifact@v4
219219
with:
220220
name: sketches_found
221221

222222
- name: Build selected sketches
223-
if: ${{ needs.gen-chunks.outputs.build_all == 'false' }}
223+
if: ${{ needs.gen-chunks.outputs.build_all == 'false' && needs.gen-chunks.outputs.build_libraries == 'true' }}
224224
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} ${{ needs.gen-chunks.outputs.chunk_count }} 1 sketches_found.txt
225225

226226
#Upload cli compile json as artifact

‎.github/workflows/qemu.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ on:
1010
required: true
1111
type: string
1212

13-
concurrency:
14-
group: qemu-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
15-
cancel-in-progress: true
16-
1713
jobs:
1814
qemu-test:
1915
name: QEMU ${{ inputs.chip }} ${{ inputs.type }} tests

‎.github/workflows/wokwi.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
description: 'Wokwi CLI API token'
1717
required: true
1818

19-
concurrency:
20-
group: tests-wokwi-${{ github.event.pull_request.number || github.ref }}-${{ inputs.chip }}-${{ inputs.type }}
21-
cancel-in-progress: true
22-
2319
env:
2420
WOKWI_TIMEOUT: 600000 # Milliseconds
2521

‎cores/esp32/MacAddress.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ bool MacAddress::fromString(const char *buf) {
6767

6868
//Parse user entered string into MAC address
6969
bool MacAddress::fromString6(const char *buf) {
70-
char cs[18];
70+
char cs[18];// 17 + 1 for null terminator
7171
char *token;
7272
char *next; //Unused but required
7373
int i;
7474

75-
strncpy(cs, buf, sizeof(cs)); //strtok modifies the buffer: copy to working buffer.
75+
strncpy(cs, buf, sizeof(cs) - 1); //strtok modifies the buffer: copy to working buffer.
7676

7777
for (i = 0; i < 6; i++) {
7878
token = strtok((i == 0) ? cs : NULL, ":"); //Find first or next token
@@ -86,12 +86,12 @@ bool MacAddress::fromString6(const char *buf) {
8686
}
8787

8888
bool MacAddress::fromString8(const char *buf) {
89-
char cs[24];
89+
char cs[24];// 23 + 1 for null terminator
9090
char *token;
9191
char *next; //Unused but required
9292
int i;
9393

94-
strncpy(cs, buf, sizeof(cs)); //strtok modifies the buffer: copy to working buffer.
94+
strncpy(cs, buf, sizeof(cs) - 1); //strtok modifies the buffer: copy to working buffer.
9595

9696
for (i = 0; i < 8; i++) {
9797
token = strtok((i == 0) ? cs : NULL, ":"); //Find first or next token

‎cores/esp32/esp32-hal-adc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ esp_err_t __analogContinuousInit(adc_channel_t *channel, uint8_t channel_num, ad
458458

459459
bool analogContinuous(uint8_t pins[], size_t pins_count, uint32_t conversions_per_pin, uint32_t sampling_freq_hz, void (*userFunc)(void)) {
460460
adc_channel_t channel[pins_count];
461-
adc_unit_t adc_unit;
461+
adc_unit_t adc_unit=ADC_UNIT_1;
462462
esp_err_t err = ESP_OK;
463463

464464
//Convert pins to channels and check if all are ADC1s unit

‎idf_component.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ dependencies:
8787
version: "1.0.3"
8888
require: public
8989
examples:
90-
- path: ./idf_component_examples/Hello_world
90+
- path: ./idf_component_examples/hello_world
File renamed without changes.

‎idf_component_examples/Hello_world/README.md‎ renamed to ‎idf_component_examples/hello_world/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ To create a ESP-IDF project from this example with the latest release of Arduino
1212
ESP-IDF will download all dependencies needed from the component registry and setup the project for you.
1313

1414
If you want to use cloned Arduino-esp32 repository, you can build this example directly.
15-
Go to the example folder `arduino-esp32/idf_component_examples/Hello_world`.
15+
Go to the example folder `arduino-esp32/idf_component_examples/hello_world`.
1616
First you need to comment line 6 `pre_release: true` in examples `/main/idf_component.yml`.
1717
Then just run command: `idf.py build`.
1818

1919
## Example folder contents
2020

21-
The project **Hello_world** contains one source file in C++ language [main.cpp](main/main.cpp). The file is located in folder [main](main).
21+
The project **hello_world** contains one source file in C++ language [main.cpp](main/main.cpp). The file is located in folder [main](main).
2222

2323
ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt`
2424
files that provide set of directives and instructions describing the project's source files and targets

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /