-
Notifications
You must be signed in to change notification settings - Fork 839
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
Local include of this library into other projects #1012
Comments
As long as you are complying with https://github.com/crankyoldgit/IRremoteESP8266/blob/master/LICENSE.txt then you are free to do so as you please. IANAL but I think the relevant clauses are:
or TL;DR: As long as you make this library's source & license freely (as in beer & speech) available, & don't claim it as your own (except for your modifications), then you can do with it as you please. e.g. Tasmota & ESPEasy use/include/incorporate this library
Not easily. The
would become:
Not impossible, but it's hard enough getting people to edit that file as is, let alone with the extra lines around them. FYI, the compiler will only include the code you actually need/gets referenced. i.e. If you don't use an Decoding however is different. The main irrecv.decode() method will go through/link in EVERY protocol specific decode routine UNLESS you've disabled it via There is no run-time way to say "only decode these few protocols" and ONLY include the compiled decode code for those protocols. Compile-time is the only way to exclude/reduce the included code. I hope that answers your questions. |
Oh, and the |
Hi @crankyoldgit thanx a lot - yes, that helps ! Would it be another possibility to not locally include the WHOLE library but only the IRremoteESP8266.h file and change only that ? (and tell platformio to use the specific version where the header was copied from (e.g. @2.7.2) ? ...just tested this and: NO, it does not work. PlatformIO does compile libraries separately (first) and then the rest of the project, so it needs to be included completely. |
Allow users of the library to externally control which protocols are used/enabled/compiled without having to modify the `IRremoteESP8266.h` file. i.e. `SEND_BLAH` & `DECODE_BLAH` can be controled with preprocessor compiler flags (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html) Fixes #1012
Hey @Def3nder , I've created a branch that should allow you to use the library without modification and control which protocols are compiled etc via This should solve your issue and address any concerns w.r.t. use under different licenses. Can you please test it out and let me know how it goes? |
Hi David, thank you so much ! I changed the lib_deps_external from And this reduces the .bin size by 2% ! Do you plan to commit this to the master ? |
Excellent. Thanks for confirming it worked as intended.
Yes. It is pending code review (PR #1013). Once that is done, it will be merged. |
Allow users of the library to externally control which protocols are used/enabled/compiled without having to modify the `IRremoteESP8266.h` file. i.e. `SEND_BLAH` & `DECODE_BLAH` can be controled with preprocessor compiler flags (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html) Fixes #1012
_v2.7.3 (20200130)_ **[Features]** - Allow protocols to be enabled or disabled with compiler flags. (#1013, #1012) - Panasonic AC: Add Ion Filter support for DKE models. (#1025, #1024) - Add support for sending Sony at 38Khz (#1029, #1018, #1019) - auto_analyse_raw_data.py: Handle analysing messages with no headers. (#1017) **[Misc]** - Fix Coolix unit test errors when using Apple c++ compiler. (#1030, #1028) - Fix Apple clang c++ compiler error in unit tests. (#1027, #1026) - Improve/fix scraping of supported devices (#1022) - Panasonic PKR series A/C uses DKE protocol. (#1020, #1021) - Update NEC supported devices. (#1018) - Add note to avoid GPIO16 on the ESP8266 for receiving. (#1016, #1015)
_v2.7.3 (20200130)_ **[Features]** - Allow protocols to be enabled or disabled with compiler flags. (#1013, #1012) - Panasonic AC: Add Ion Filter support for DKE models. (#1025, #1024) - Add support for sending Sony at 38Khz (#1029, #1018, #1019) - auto_analyse_raw_data.py: Handle analysing messages with no headers. (#1017) **[Misc]** - Fix Coolix unit test errors when using Apple c++ compiler. (#1030, #1028) - Fix Apple clang c++ compiler error in unit tests. (#1027, #1026) - Improve/fix scraping of supported devices (#1022) - Panasonic PKR series A/C uses DKE protocol. (#1020, #1021) - Update NEC supported devices. (#1018) - Add note to avoid GPIO16 on the ESP8266 for receiving. (#1016, #1015)
The code changes referenced above have been included in the v2.7.3 release of the library. |
Hi David,
I love the IRremoteESP8266 library and the ESP32 support since 2.6.2 😄
However the number of different mostly air conditioner protocols occupies a lot of program space (like 28k). Changing the #defines in the IRremoteESP8266.h header file from "true" to "false" does resolve this problem.
Now my question: is it allowed to use an exact copy of this library e.g. v2.7.2 and add this to another project (not as include but directly in the src directory) and then make only these #define-changes ?
...or is there any way of getting the compiler to not use any SEND-code and no code for air conditioners ?
The text was updated successfully, but these errors were encountered: