-
Notifications
You must be signed in to change notification settings - Fork 899
[Build] Add compatibility with C++20 #2040
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
[Build] Add compatibility with C++20 #2040
Conversation
|
Looks like the linter and doxygen need some fix to support conditional compilation 👎 |
|
Have you considered defining internal types separately, all the #if s are becoming quite messy? |
I'll think about that, but IMHO it'll be about as messy... 😞 |
Now using typedefs for everything that was defined |
NiKiZe
left a comment
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'm for the atomic_ changes, not sure about the rest which is more relevant to platformio than c++?
…witching interrupts off/on instead of (missing) low-level IDF calls
|
@tonhuisman Why going back to core 2.0.x? Makes no sense. The platform 2023.10.03 is NOT based on IDF5.1 EDIT: Comment race condition ;-) |
|
@tonhuisman Adding this fixes the compile error and no code change regarding interrupts are needed |
Thanks! 🦸 |
…disable`, thnx Jason2866!
|
FYI. I've seen this PR and been thinking about how to do this "better" in a way. Btw .. thanks ever so much for all the work you've all put into this PR, it's awesome. You've done a great job. I just want to clean up something we inherited from the original IRremote library and the early days of this library. That stuff was left pretty much unchanged because it was magic code & worked, and assumed people know exactly what they were doing. My research in to In short, I want to enlist you guys (@tonhuisman & @Jason2866, tasmota etal) in helping to better fix it, and I don't want to just copy a lot of your work and pretend it was my work. |
|
Looking forward to do testing on all ESP32x MCUS. Considering to do a RMT driver? |
|
I've changed my mind on the approach. |
crankyoldgit
left a comment
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.
What tests on actual hardware have been done? i.e. Does it still capture okay on ESP32s & 8266s?
|
|
||
| #if defined(ESP32) | ||
| #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 3) ) | ||
| #include <driver/gpio.h> |
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.
Does this hurt or cause an issue if it is always included?
i.e. Can we just include this header all the time?
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'm more inclined to only add includes when really needed, trying to avoid unneeded code being pulled in the build or having unexpected interactions.
|
Thank you for your update regarding the library versions. I will proceed
with verifying these library versions and ensure compatibility. Should I
encounter any issues or require further clarification, I will reach out to
you.
…On Fri, 31 May, 2024, 8:18 am Zhentao-Lin, ***@***.***> wrote:
V2.0.14 before can use this library, V2.0.15-V2.0.17 I have not tested, it
should be OK. Neither V3.0.0 is possible.
—
Reply to this email directly, view it on GitHub
<#2040 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBRO5NNRSZBIPRNCWJQPKG3ZE7QGJAVCNFSM6AAAAAA5WJEGFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGE2DCNRYGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Works for me without errors, if add "bool timerStarted(hw_timer_t *timer);" to "esp32-hal-timer.h" and "esp32-hal-timer.c" and use this function in "IRrecv.cpp". Base were the commits 9cfcebc and db98aa0 Test and files can be found here : https://github.com/mboehmerm/Three-IPS-Displays-with-ST7789-170x320-240x280-240x320/tree/main/IRremoteESP8266 Added in esp32-hal-timer.h Added in esp32-hal-timer.c In the file IRrecv.cpp i replaced with and with I hope there is a better solution without modifying the esp32-hal-timer files. |
|
@mboehmerm Dont know what's causing the need that you have to modify files. |
This is the first solution i found, that works with Arduino IDE without any errors. Is there a better solution? Where can i find it? |
🤔 (... sorry, too obvious...) |
|
I get an error |
|
I'm also seeing the same error as @almirus regarding gptimer when using Arduino IDE targeting a M5Stack NanoC6. The library also fails to receive the NEC codes that were previously working under ESP32 2.0.17 - so I don't believe they're spurious either. |
|
I'm considering merging #2144 which only has changes for ESP32 CoreV3, that way we don't risk breaking anything for earlier versions? After that we could look into merging any other changes? How does that sound? |
|
We have been using these adjustments on the Arduino 3.x/IDF 5.x builds of ESPEasy since I started this PR, so I see no reason not to merge this, and other relevant changes. |
In principle I agree, #2144 is a duplicate, but there is also about the cleanest solution. (read: easiest to review) In it's current state it essentially only has added lines and no changes, which I can validate does not create any new issues for <V3 My hope is that this PR can be rebased on #2144 and then review the remaining parts. |
The scope of this PR is to instate compatibility with C++20, not 'just' Arduino 3.x. |
A small fix to remove "volatile ++" build warning. Source: crankyoldgit#2040
Include open upstream PR crankyoldgit#2144 to make IR learning compatible with IDF 5.x. Enhance with: * update esp32-hal* to IDF v5.4 * C++20 compatibility A small fix to remove "volatile ++" build warning. Source: crankyoldgit#2040 --------- Co-authored-by: BorisKofman <Borisk@salt.security> Co-authored-by: Christian I. Nilsson <nikize@gmail.com>
|
Is this ever going to get merged? |
|
This appears to be failing the unit tests. Perhaps it needs to be re-based on the recent PRs that address the automated build tests? |
It just needed an update of the platform package, as the old one was over 2 years old... 🤔 Now, all is fine again. |
crankyoldgit
left a comment
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.
LGTM. Thanks for fixing.
**[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
**[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
_v2.9.0 (20260103)_ release **[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
Feature:
volatileoperators like++and volatile method argumentsResolves #2039