Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General examples updates #7727

Merged
merged 13 commits into from
Feb 15, 2023
Merged

Conversation

PilnyTomas
Copy link
Contributor

@PilnyTomas PilnyTomas commented Jan 18, 2023

This PR contains improvements of more examples which have been investigated in issue #7659.

Updated examples: (to be added)

@PilnyTomas PilnyTomas self-assigned this Jan 18, 2023
@PilnyTomas PilnyTomas marked this pull request as draft January 18, 2023 15:02
@VojtechBartoska VojtechBartoska changed the title Draft: Update examples based on table from #7659 Draft: General examples updates Jan 18, 2023
@VojtechBartoska VojtechBartoska added the Type: Example Issue is related to specific example. label Jan 18, 2023
@VojtechBartoska VojtechBartoska added the Status: In Progress Issue is in progress label Jan 25, 2023
@PilnyTomas
Copy link
Contributor Author

@martinius96 Could you please help me out with description on your example WiFiClientSecureEnterprise ?

@PilnyTomas PilnyTomas marked this pull request as ready for review February 2, 2023 11:13
@VojtechBartoska VojtechBartoska added Status: Review needed Issue or PR is awaiting review and removed Status: In Progress Issue is in progress labels Feb 2, 2023

#ifndef USE_NAME
#define USE_MAC
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you either have USE_NAME defined, or not, I suggest removing this and using #ifdef+#else in the code below. Else it looks like you could have both defined at the same time.

public:
Button(uint8_t reqPin) : PIN(reqPin){
pinMode(PIN, INPUT_PULLUP);
attachInterrupt(PIN, std::bind(&Button::isr,this), FALLING);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While your changes provide simpler code, the original example shows how to attach an interrupt to a class method (and that is often asked), so I suggest to keep the old way and use class instead of struct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrominatel could you please explain why we went from c++ to c?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just a matter of getting consistency across many examples in C, and not in C++.

I would prefer to keep the FunctionalInterrupt example as is and add a new one using a simpler code, as you already did.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we agree that the example with class Button should stay and a new one with struct Button should be added?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Is that ok for you @PilnyTomas?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PilnyTomas this is still left to be done

@me-no-dev
Copy link
Member

left some notes, otherwise LGTM

@VojtechBartoska VojtechBartoska changed the title Draft: General examples updates General examples updates Feb 6, 2023
@VojtechBartoska VojtechBartoska self-requested a review February 6, 2023 13:08
Copy link
Member

@pedrominatel pedrominatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some minor comments (nitpicking), otherwise, LGTM.

libraries/WebServer/examples/MultiHomedServers/README.md Outdated Show resolved Hide resolved
libraries/WebServer/examples/MultiHomedServers/README.md Outdated Show resolved Hide resolved
libraries/WebServer/examples/MultiHomedServers/README.md Outdated Show resolved Hide resolved
libraries/WiFiClientSecure/README.md Outdated Show resolved Hide resolved
@VojtechBartoska VojtechBartoska added this to the 2.0.7 milestone Feb 13, 2023
@VojtechBartoska
Copy link
Contributor

@me-no-dev It's ready to be reviewed and merged.

@VojtechBartoska VojtechBartoska added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Feb 15, 2023
@me-no-dev me-no-dev merged commit 23f653a into espressif:master Feb 15, 2023
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Feb 15, 2023
* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>
Jason2866 added a commit to Jason2866/arduino-esp32 that referenced this pull request Feb 17, 2023
* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Update toolchains and openocd for ESP-IDF v4.4.4

* Update get.py to support Apple ARM64

* Update package version

* Update ESP-IDF libs to v4.4.4

* Fix compilation issue caused by ESP-Insights

* Update esptool to v4.4

* Update esptool to v4.5

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (espressif#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: me-no-dev <[email protected]>
Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Me No Dev <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Feb 20, 2023
* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Apr 14, 2023
* Update toolchains and openocd for ESP-IDF v4.4.4

* Update get.py to support Apple ARM64

* Update package version

* Update ESP-IDF libs to v4.4.4

* Fix compilation issue caused by ESP-Insights

* Update esptool to v4.4

* Update esptool to v4.5

* Update package_esp32_index.template.json

* Tasmota changes for core 2.0.7

* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>

* Fix change

* remove duplicate fix

* Delete README.md

* Create README.md

* Fix erratic problem when sending IPv6 UDP packet

* Update WiFiGeneric.cpp

---------

Co-authored-by: me-no-dev <[email protected]>
Co-authored-by: Me No Dev <[email protected]>
Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Co-authored-by: s-hadinger <[email protected]>
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Apr 14, 2023
* Tasmota changes for core 2.0.7

* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>

* Fix change

* remove duplicate fix

* Delete README.md

* Create README.md

* Delete README.md

* Create README.md

* Tasmota

* Tasmota changes for core 2.0.7
* IPv6 support
* Ethernet driver JL1101

* Fix erratic problem when sending IPv6 UDP packet

* Fix erratic problem when sending IPv6 UDP packet

* Update package_esp32_index.template.json

* Update WiFiGeneric.cpp

* Update WiFiGeneric.cpp (#211)

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Co-authored-by: s-hadinger <[email protected]>
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Apr 14, 2023
* Update toolchains and openocd for ESP-IDF v4.4.4

* Update get.py to support Apple ARM64

* Update package version

* Update ESP-IDF libs to v4.4.4

* Fix compilation issue caused by ESP-Insights

* Update esptool to v4.4

* Update esptool to v4.5

* Update package_esp32_index.template.json

* Tasmota changes for core 2.0.7

* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>

* Fix change

* remove duplicate fix

* Delete README.md

* Create README.md

* Fix erratic problem when sending IPv6 UDP packet

* Update WiFiGeneric.cpp

---------

Co-authored-by: me-no-dev <[email protected]>
Co-authored-by: Me No Dev <[email protected]>
Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Co-authored-by: s-hadinger <[email protected]>
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Sep 9, 2023
* Tasmota release/

* Tasmota changes for core 2.0.7

* Tasmota changes

* Tasmota 2.0.6 with IPv6 support
* IPv6 support
* Ethernet driver JL1101
Co-authored-by: Danii Mirsanov <[email protected]>

* Update install-platformio-esp32.sh

* Fix conflicts

* Tasmota repos

* overlooked `timeout` change to `timeout_ms`

* Sets correct code for UART baud rate detection

Co-authored-by: Rodrigo Garcia <[email protected]>

* General examples updates (espressif#7727) (#196)

* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example

Co-authored-by: Tomáš Pilný <[email protected]>

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>

* Fix change

* remove duplicate fix

* Delete README.md

* Create README.md

* Delete README.md

* Create README.md

* Tasmota

* Tasmota changes for core 2.0.7
* IPv6 support
* Ethernet driver JL1101

* Fix erratic problem when sending IPv6 UDP packet

* Fix erratic problem when sending IPv6 UDP packet

* Update package_esp32_index.template.json

* Update WiFiGeneric.cpp

* Update WiFiGeneric.cpp (#211)

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Co-authored-by: s-hadinger <[email protected]>

* `tv.tv_usec = (_timeout  % 1000) * 1000;` align with upstream

* Update package_esp32_index.template.json

* allows setting buffer size after or before begin() (#242)

Co-authored-by: Me No Dev <[email protected]>
Co-authored-by: Rodrigo Garcia <[email protected]>

* 2.0.12

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Tomáš Pilný <[email protected]>
Co-authored-by: s-hadinger <[email protected]>
Co-authored-by: Me No Dev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged Type: Example Issue is related to specific example.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants