-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
General examples updates #7727
Conversation
@martinius96 Could you please help me out with description on your example |
|
||
#ifndef USE_NAME | ||
#define USE_MAC | ||
#endif |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
left some notes, otherwise LGTM |
There was a problem hiding this 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.
…ion as new example
@me-no-dev It's ready to be reviewed and merged. |
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
This PR contains improvements of more examples which have been investigated in issue #7659.
Updated examples: (to be added)