From c73fd88d1c80dab8098e3731a5094cb11962a65a Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 29 Jul 2023 14:13:58 +0200 Subject: [PATCH] IRremoteESP8266 library from v2.8.5 to v2.8.6 (#19212) --- CHANGELOG.md | 1 + .../IRremoteESP8266/IRremoteESP8266/README.md | 4 +-- .../IRremoteESP8266/README_de.md | 4 +-- .../IRremoteESP8266/README_fr.md | 4 +-- .../IRremoteESP8266/README_nl.md | 4 +-- .../IRremoteESP8266/ReleaseNotes.md | 18 ++++++++++ .../IRremoteESP8266/SupportedProtocols.md | 5 ++- .../examples/BlynkIrRemote/BlynkIrRemote.ino | 2 ++ .../examples/IRrecvDumpV2/platformio.ini | 7 +++- .../examples/SmartIRRepeater/platformio.ini | 1 + .../IRremoteESP8266/library.json | 2 +- .../IRremoteESP8266/library.properties | 2 +- .../IRremoteESP8266/src/IRac.cpp | 28 +++++++++------ .../IRremoteESP8266/src/IRrecv.cpp | 8 ----- .../IRremoteESP8266/src/IRremoteESP8266.h | 2 +- .../IRremoteESP8266/src/IRsend.h | 5 +-- .../IRremoteESP8266/src/IRutils.cpp | 14 +++----- .../IRremoteESP8266/src/ir_Coolix.cpp | 3 ++ .../IRremoteESP8266/src/ir_Kelvinator.h | 2 +- .../IRremoteESP8266/src/ir_Samsung.cpp | 5 +-- .../IRremoteESP8266/test/IRac_test.cpp | 11 +++--- .../IRremoteESP8266/test/ir_Coolix_test.cpp | 36 +++++++++++++++++++ lib/lib_basic/IRremoteESP8266/library.json | 2 +- 23 files changed, 118 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b2050d40..bb3a66d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. - Initial ``DisplayMode`` from 1 to 0 and ``DisplayDimmmer`` from 10% to 50% (#19138) - ESP32 Framework (Core) from v2.0.10 to v2.0.11 - Berry `mqtt.publish` now distinguishes between `string` and `bytes` +- IRremoteESP8266 library from v2.8.5 to v2.8.6 ### Fixed - Initial battery level percentage (#19160) diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README.md index 47178861a..5eac39e4b 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README.md @@ -10,8 +10,8 @@ This library enables you to **send _and_ receive** infra-red signals on an [ESP8266](https://github.com/esp8266/Arduino) or an [ESP32](https://github.com/espressif/arduino-esp32) using the [Arduino framework](https://www.arduino.cc/) using common 940nm IR LEDs and common IR receiver modules. e.g. TSOP{17,22,24,36,38,44,48}* demodulators etc. -## v2.8.5 Now Available -Version 2.8.5 of the library is now [available](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). You can view the [Release Notes](ReleaseNotes.md) for all the significant changes. +## v2.8.6 Now Available +Version 2.8.6 of the library is now [available](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). You can view the [Release Notes](ReleaseNotes.md) for all the significant changes. #### Upgrading from pre-v2.0 Usage of the library has been slightly changed in v2.0. You will need to change your usage to work with v2.0 and beyond. You can read more about the changes required on our [Upgrade to v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0) page. diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_de.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_de.md index f55860528..9e584bb84 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_de.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_de.md @@ -11,8 +11,8 @@ Diese Programmbibliothek ermöglicht das **Senden _und_ Empfangen** von Infrarotsignalen mit [ESP8266](https://github.com/esp8266/Arduino)- und [ESP32](https://github.com/espressif/arduino-esp32)-Mikrocontrollern mithilfe des [Arduino-Frameworks](https://www.arduino.cc/) und handelsüblichen 940nm Infrarot-LEDs undIR-Empfängermodulen, wie zum Beispiel TSOP{17,22,24,36,38,44,48}*-Demodulatoren. -## v2.8.5 jetzt verfügbar -Version 2.8.5 der Bibliothek ist nun [verfügbar](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Die [Versionshinweise](ReleaseNotes.md) enthalten alle wichtigen Neuerungen. +## v2.8.6 jetzt verfügbar +Version 2.8.6 der Bibliothek ist nun [verfügbar](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Die [Versionshinweise](ReleaseNotes.md) enthalten alle wichtigen Neuerungen. #### Hinweis für Nutzer von Versionen vor v2.0 Die Benutzung der Bibliothek hat sich mit Version 2.0 leicht geändert. Einige Anpassungen im aufrufenden Code werden nötig sein, um mit Version ab 2.0 korrekt zu funktionieren. Mehr zu den Anpassungen finden sich auf unserer [Upgrade to v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0)-Seite. diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_fr.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_fr.md index 430d32de3..f7bd69eaf 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_fr.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_fr.md @@ -10,8 +10,8 @@ Cette librairie vous permetra de **recevoir et d'envoyer des signaux** infrarouge sur le protocole [ESP8266](https://github.com/esp8266/Arduino) ou sur le protocole [ESP32](https://github.com/espressif/arduino-esp32) en utilisant le [Arduino framework](https://www.arduino.cc/) qui utilise la norme 940nm IR LEDs et le module basique de reception d'onde IR. Exemple : TSOP{17,22,24,36,38,44,48}* modules etc. -## v2.8.5 disponible -Version 2.8.5 de la libraire est maintenant [disponible](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Vous pouvez voir le [Release Notes](ReleaseNotes.md) pour tous les changements importants. +## v2.8.6 disponible +Version 2.8.6 de la libraire est maintenant [disponible](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Vous pouvez voir le [Release Notes](ReleaseNotes.md) pour tous les changements importants. #### mise à jour depuis pre-v2.0 L'utilisation de la librairie à un peu changer depuis la version in v2.0. Si vous voulez l'utiliser vous devrez changer votre utilisation aussi. Vous pouvez vous renseigner sur les précondition d'utilisation ici : [Upgrade to v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0) page. diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_nl.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_nl.md index fdea85cae..8c4cb8e08 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_nl.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/README_nl.md @@ -10,8 +10,8 @@ Deze library maakt het mogelijk om Infraroodsignalen **te versturen en ontvangen** via het [Arduino framework](https://www.arduino.cc/) met veelgebruikte 940nm IR LEDs en IR ontvang modules. b.v. TSOP{17,22,24,36,38,44,48}* demodulatoren enz. -## v2.8.5 nu beschikbaar -Versie 2.8.5 van de bibliotheek is nu [beschikbaar](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Bekijk de [Release Notes](ReleaseNotes.md) voor alle belangrijke veranderingen. +## v2.8.6 nu beschikbaar +Versie 2.8.6 van de bibliotheek is nu [beschikbaar](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Bekijk de [Release Notes](ReleaseNotes.md) voor alle belangrijke veranderingen. #### Upgraden vanaf pre-v2.0 Het gebruik van de bibliotheek is enigszins gewijzigd in v2.0. Je zult het gebruik moeten aanpassen om te kunnen werken met v2.0 en hoger. Je kunt meer lezen over de vereiste aanpassingen op onze [Upgraden naar v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0) pagina. diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/ReleaseNotes.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/ReleaseNotes.md index d9e86c7e3..27b5b3fac 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/ReleaseNotes.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/ReleaseNotes.md @@ -1,5 +1,23 @@ # Release Notes +## _v2.8.6 (20230727)_ + +**[Bug Fixes]** +- Ensure `IRCoolixAC::toCommon()` returns `kNoTempValue` when no sensor temp is detected. (#2015 #2012) +- Fix compilation dependency of LG on Samsung send protocol (#2011 #2010) +- Fix missing parameter in call to `IRac::gree()` (#2008 #2007) + +**[Features]** +- IRac: Ensure the `sleep` parameter is used for the `FUJITSU_AC` protocol. (#1992 #1991) + +**[Misc]** +- Allow the BlynkIRRemote.ino code to compile again. (#2016) +- do not list WHIRLPOOL_AC unconditionally as supported protocol (#2003) +- IRUtils:typeToString() — simplify (#2002) +- Fix brand Green -> Gree (#1994) +- Fix undefined `std::round` compilation error (#1989) + + ## _v2.8.5 (20230508)_ **[Bug Fixes]** diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/SupportedProtocols.md b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/SupportedProtocols.md index 46b65ca5e..3c6d38a03 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/SupportedProtocols.md +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/SupportedProtocols.md @@ -1,6 +1,6 @@ + Last generated: Thu 27 Jul 2023 05:37:11 +0000 ---> # IR Protocols supported by this library | Protocol | Brand | Model | A/C Model | Detailed A/C Support | @@ -65,8 +65,7 @@ | [JVC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_JVC.cpp) | **JVC** | PTU94023B remote | | - | | [Kelon](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelon.cpp) | **[Hisense](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelon.h)** | AST-09UW4RVETG00A A/C (KELON168) | | Yes | | [Kelon](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelon.cpp) | **[Kelon](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelon.h)** | AST-09UW4RVETG00A A/C (KELON168)
DG11R2-01 remote (KELON168)
ON/OFF 9000-12000 (KELON) | | Yes | -| [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | YAP0F8 remote | | Yes | -| [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Green](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | YAPOF3 remote | | Yes | +| [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | YAP0F8 remote
YAPOF3 remote | | Yes | | [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | KSV26CRC A/C
KSV26HRC A/C
KSV35CRC A/C
KSV35HRC A/C
KSV53HRC A/C
KSV62HRC A/C
KSV70CRC A/C
KSV70HRC A/C
KSV80HRC A/C
YALIF Remote | | Yes | | [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Sharp](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | A5VEY A/C
YB1FA remote | | Yes | | [LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.cpp) | **[General Electric](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.h)** | 6711AR2853M Remote (LG - GE6711AR2853M)
AG1BH09AW101 A/C (LG - GE6711AR2853M) | | Yes | diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/BlynkIrRemote/BlynkIrRemote.ino b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/BlynkIrRemote/BlynkIrRemote.ino index 6e659bd64..1948f3c4c 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/BlynkIrRemote/BlynkIrRemote.ino +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/BlynkIrRemote/BlynkIrRemote.ino @@ -104,6 +104,8 @@ /* Comment this out to disable prints and save space */ #define BLYNK_PRINT Serial +#define BLYNK_TEMPLATE_ID "TMPL••••••••" // Made up values. Please Change. +#define BLYNK_TEMPLATE_NAME "My First Device" // Please Change. #if defined(ESP8266) #include diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/IRrecvDumpV2/platformio.ini b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/IRrecvDumpV2/platformio.ini index b56304f66..eca7c917e 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/IRrecvDumpV2/platformio.ini +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/IRrecvDumpV2/platformio.ini @@ -64,4 +64,9 @@ build_flags = -D_IR_LOCALE_=zh-CN ; Chinese (Simplified) ; Build the library with all protocols disabled to flush out #if/#ifdef issues & ; any compiler warnings, by turning them into errors. [env:shakedown_no_protocols] -build_flags = -D_IR_ENABLE_DEFAULT_=false -Werror -Wno-error=switch +build_flags = + ${env.build_flags} + -Werror + -Wno-error=switch + -Wno-error=switch-unreachable + -D_IR_ENABLE_DEFAULT_=false diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/SmartIRRepeater/platformio.ini b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/SmartIRRepeater/platformio.ini index 0db3d6dc8..88a7e8a17 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/SmartIRRepeater/platformio.ini +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/examples/SmartIRRepeater/platformio.ini @@ -34,4 +34,5 @@ build_flags = ${env.build_flags} -Werror -Wno-error=switch + -Wno-error=switch-unreachable -D_IR_ENABLE_DEFAULT_=false diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.json b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.json index 302372566..60c481152 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.json +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.json @@ -1,6 +1,6 @@ { "name": "IRremoteESP8266", - "version": "2.8.5", + "version": "2.8.6", "keywords": "infrared, ir, remote, esp8266, esp32", "description": "Send and receive infrared signals with multiple protocols (ESP8266/ESP32)", "repository": diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.properties b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.properties index 769cbc1fa..faed00b75 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.properties +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/library.properties @@ -1,5 +1,5 @@ name=IRremoteESP8266 -version=2.8.5 +version=2.8.6 author=David Conran, Sebastien Warin, Mark Szabo, Ken Shirriff maintainer=David Conran, Mark Szabo, Sebastien Warin, Roi Dayan, Massimiliano Pinto, Christian Nilsson sentence=Send and receive infrared signals with multiple protocols (ESP8266/ESP32) diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRac.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRac.cpp index 8826bc1ae..67c218c1e 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRac.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRac.cpp @@ -13,6 +13,11 @@ #include #endif #include +#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_MATH_TR1) + using std::roundf; +#else + using ::roundf; +#endif #include "IRsend.h" #include "IRremoteESP8266.h" #include "IRtext.h" @@ -366,7 +371,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) { #if SEND_YORK case decode_type_t::YORK: #endif +#if SEND_WHIRLPOOL_AC case decode_type_t::WHIRLPOOL_AC: +#endif return true; default: return false; @@ -489,9 +496,9 @@ void IRac::argo(IRArgoAC *ac, ac->begin(); ac->setPower(on); ac->setMode(ac->convertMode(mode)); - ac->setTemp(static_cast(std::round(degrees))); + ac->setTemp(static_cast(roundf(degrees))); if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } ac->setiFeel(iFeel); ac->setFan(ac->convertFan(fan)); @@ -537,7 +544,7 @@ void IRac::argoWrem3_ACCommand(IRArgoAC_WREM3 *ac, const bool on, ac->setMode(ac->convertMode(mode)); ac->setTemp(degrees); if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } ac->setiFeel(iFeel); ac->setFan(ac->convertFan(fan)); @@ -563,7 +570,7 @@ void IRac::argoWrem3_ACCommand(IRArgoAC_WREM3 *ac, const bool on, void IRac::argoWrem3_iFeelReport(IRArgoAC_WREM3 *ac, const float sensorTemp) { ac->begin(); ac->setMessageType(argoIrMessageType_t::IFEEL_TEMP_REPORT); - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); ac->send(); } @@ -738,7 +745,7 @@ void IRac::coolix(IRCoolixAC *ac, // No Econo setting available. // No Quiet setting available. if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } else { ac->clearSensorTemp(); } @@ -1128,7 +1135,7 @@ void IRac::ecoclim(IREcoclimAc *ac, ac->setTemp(degrees); ac->setFan(ac->convertFan(fan)); if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } else { ac->setSensorTemp(degrees); //< Set to the desired temp // until we can disable. @@ -1174,7 +1181,7 @@ void IRac::electra(IRElectraAc *ac, ac->setMode(ac->convertMode(mode)); ac->setTemp(degrees); if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } ac->setFan(ac->convertFan(fan)); ac->setSwingV(swingv != stdAc::swingv_t::kOff); @@ -2288,7 +2295,7 @@ void IRac::sanyo(IRSanyoAc *ac, ac->setMode(ac->convertMode(mode)); ac->setTemp(degrees); if (sensorTemp != kNoTempValue) { - ac->setSensorTemp(static_cast(std::round(sensorTemp))); + ac->setSensorTemp(static_cast(roundf(sensorTemp))); } else { ac->setSensorTemp(degrees); // Set the sensor temp to the desired // (normal) temp. @@ -3229,7 +3236,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) { fujitsu(&ac, (fujitsu_ac_remote_model_t)send.model, send.power, send.mode, send.celsius, send.degrees, send.fanspeed, send.swingv, send.swingh, send.quiet, - send.turbo, send.econo, send.filter, send.clean); + send.turbo, send.econo, send.filter, send.clean, send.sleep); break; } #endif // SEND_FUJITSU_AC @@ -3249,7 +3256,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) { _modulation); gree(&ac, (gree_ac_remote_model_t)send.model, send.power, send.mode, send.celsius, send.degrees, send.fanspeed, send.swingv, send.swingh, - send.turbo, send.econo, send.light, send.clean, send.sleep); + send.iFeel, send.turbo, send.econo, send.light, send.clean, + send.sleep); break; } #endif // SEND_GREE diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRrecv.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRrecv.cpp index ecb8a382b..173526104 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRrecv.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRrecv.cpp @@ -412,10 +412,6 @@ void IRrecv::pause(void) { params.rcvstate = kStopState; params.rawlen = 0; params.overflow = false; -#if defined(ESP8266) - os_timer_disarm(&timer); - detachInterrupt(params.recvpin); -#endif #if defined(ESP32) gpio_intr_disable((gpio_num_t)params.recvpin); #endif // ESP32 @@ -429,10 +425,6 @@ void IRrecv::resume(void) { params.rcvstate = kIdleState; params.rawlen = 0; params.overflow = false; -#if defined(ESP8266) - os_timer_setfn(&timer, reinterpret_cast(read_timeout),NULL); - attachInterrupt(params.recvpin, gpio_intr, CHANGE); -#endif #if defined(ESP32) timerAlarmDisable(timer); gpio_intr_enable((gpio_num_t)params.recvpin); diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRremoteESP8266.h b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRremoteESP8266.h index 133d507b8..949de1ecf 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRremoteESP8266.h +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRremoteESP8266.h @@ -58,7 +58,7 @@ // Minor version number (x.X.x) #define _IRREMOTEESP8266_VERSION_MINOR 8 // Patch version number (x.x.X) -#define _IRREMOTEESP8266_VERSION_PATCH 5 +#define _IRREMOTEESP8266_VERSION_PATCH 6 // Macro to convert version info into an integer #define _IRREMOTEESP8266_VERSION_VAL(major, minor, patch) \ (((major) << 16) | ((minor) << 8) | (patch)) diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRsend.h b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRsend.h index f8a447197..38491372a 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRsend.h +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRsend.h @@ -310,11 +310,12 @@ class IRsend { void sendSherwood(uint64_t data, uint16_t nbits = kSherwoodBits, uint16_t repeat = kSherwoodMinRepeat); #endif -#if SEND_SAMSUNG + // `sendSAMSUNG()` is required by `sendLG()` +#if (SEND_SAMSUNG || SEND_LG) void sendSAMSUNG(const uint64_t data, const uint16_t nbits = kSamsungBits, const uint16_t repeat = kNoRepeat); uint32_t encodeSAMSUNG(const uint8_t customer, const uint8_t command); -#endif +#endif // (SEND_SAMSUNG || SEND_LG) #if SEND_SAMSUNG36 void sendSamsung36(const uint64_t data, const uint16_t nbits = kSamsung36Bits, const uint16_t repeat = kNoRepeat); diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRutils.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRutils.cpp index 4c713c87b..e9af0b28f 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRutils.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRutils.cpp @@ -145,16 +145,12 @@ String typeToString(const decode_type_t protocol, const bool isRepeat) { result = kUnknownStr; } else { auto *ptr = reinterpret_cast(kAllProtocolNamesStr); - if (protocol > kLastDecodeType || protocol == decode_type_t::UNKNOWN) { - result = kUnknownStr; - } else { - for (uint16_t i = 0; i <= protocol && STRLEN(ptr); i++) { - if (i == protocol) { - result = FPSTR(ptr); - break; - } - ptr += STRLEN(ptr) + 1; + for (uint16_t i = 0; i <= protocol && STRLEN(ptr); i++) { + if (i == protocol) { + result = FPSTR(ptr); + break; } + ptr += STRLEN(ptr) + 1; } } if (isRepeat) { diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Coolix.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Coolix.cpp index 3fb4e8d0a..6769ebb79 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Coolix.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Coolix.cpp @@ -549,6 +549,9 @@ stdAc::state_t IRCoolixAC::toCommon(const stdAc::state_t *prev) const { result.mode = toCommonMode(getMode()); result.degrees = getTemp(); result.sensorTemperature = getSensorTemp(); + if (result.sensorTemperature == kCoolixSensorTempIgnoreCode) { + result.sensorTemperature = kNoTempValue; + } result.iFeel = getZoneFollow(); result.fanspeed = toCommonFanSpeed(getFan()); return result; diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Kelvinator.h b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Kelvinator.h index 32cb3e1fa..342c60592 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Kelvinator.h +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Kelvinator.h @@ -13,7 +13,7 @@ // Brand: Kelvinator, Model: KSV70CRC A/C // Brand: Kelvinator, Model: KSV70HRC A/C // Brand: Kelvinator, Model: KSV80HRC A/C -// Brand: Green, Model: YAPOF3 remote +// Brand: Gree, Model: YAPOF3 remote // Brand: Gree, Model: YAP0F8 remote // Brand: Sharp, Model: YB1FA remote // Brand: Sharp, Model: A5VEY A/C diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Samsung.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Samsung.cpp index b3fe2a860..958f2665b 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Samsung.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/ir_Samsung.cpp @@ -82,7 +82,8 @@ using irutils::addTempToString; using irutils::addToggleToString; using irutils::minsToString; -#if SEND_SAMSUNG +// This sending protocol is used by some other protocols. e.g. LG. +#if (SEND_SAMSUNG || SEND_LG) /// Send a 32-bit Samsung formatted message. /// Status: STABLE / Should be working. /// @param[in] data The message to be sent. @@ -112,7 +113,7 @@ uint32_t IRsend::encodeSAMSUNG(const uint8_t customer, const uint8_t command) { return ((revcommand ^ 0xFF) | (revcommand << 8) | (revcustomer << 16) | (revcustomer << 24)); } -#endif +#endif // (SEND_SAMSUNG || SEND_LG) #if DECODE_SAMSUNG /// Decode the supplied Samsung 32-bit message. diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/IRac_test.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/IRac_test.cpp index 32a745a31..8d6274c65 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/IRac_test.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/IRac_test.cpp @@ -669,7 +669,8 @@ TEST(TestIRac, Fujitsu) { false, // Turbo (Powerful) false, // Econo true, // Filter - true); // Clean + true, // Clean + -1); // Sleep ASSERT_EQ(ardb1_expected, ac.toString()); ac._irsend.makeDecodeResult(); EXPECT_TRUE(capture.decode(&ac._irsend.capture)); @@ -719,7 +720,8 @@ TEST(TestIRac, Fujitsu) { false, // Turbo (Powerful) false, // Econo true, // Filter - true); // Clean + true, // Clean + -1); // Sleep ASSERT_EQ(arry4_expected, ac.toString()); ac._irsend.makeDecodeResult(); EXPECT_TRUE(capture.decode(&ac._irsend.capture)); @@ -742,8 +744,9 @@ TEST(TestIRac, Fujitsu) { false, // Quiet false, // Turbo (Powerful) false, // Econo - false, // Filter - false); // Clean + false, // Filter + false, // Clean + -1); // Sleep ASSERT_EQ(arrew4e_expected, ac.toString()); ac._irsend.makeDecodeResult(); EXPECT_TRUE(capture.decode(&ac._irsend.capture)); diff --git a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/ir_Coolix_test.cpp b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/ir_Coolix_test.cpp index ba3610bc7..101fab654 100644 --- a/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/ir_Coolix_test.cpp +++ b/lib/lib_basic/IRremoteESP8266/IRremoteESP8266/test/ir_Coolix_test.cpp @@ -492,6 +492,9 @@ TEST(TestCoolixACClass, SetGetClearSensorTempAndZoneFollow) { EXPECT_EQ( "Power: On, Mode: 3 (Heat), Fan: 6 (Zone Follow), Temp: 24C, " "Zone Follow: On, Sensor Temp: 19C", ac.toString()); + // For #Issue2012 + EXPECT_EQ(19, ac.getSensorTemp()); + EXPECT_EQ(19, ac.toCommon().sensorTemperature); } TEST(TestCoolixACClass, SpecialModesAndReset) { @@ -1068,3 +1071,36 @@ TEST(TestDecodeCoolix48, SyntheticSelfDecode) { "m552s5244", irsend.outputStr()); } + +// Test for issue https://github.com/crankyoldgit/IRremoteESP8266/issues/2012#issuecomment-1650098971 +TEST(TestCoolixACClass, Issue2012) { + IRrecv irrecv(kGpioUnused); + IRCoolixAC ac(kGpioUnused); + + ac.stateReset(); + ac.setRaw(0xB21FD8); + EXPECT_EQ( + "Power: On, Mode: 2 (Auto), Fan: 0 (Auto0), Temp: 26C, " + "Zone Follow: Off, Sensor Temp: Off", + ac.toString()); + EXPECT_EQ(kNoTempValue, ac.toCommon().sensorTemperature); + + ac.setRaw(0xB21F98); + EXPECT_EQ( + "Power: On, Mode: 2 (Auto), Fan: 0 (Auto0), Temp: 27C, " + "Zone Follow: Off, Sensor Temp: Off", + ac.toString()); + EXPECT_EQ(kNoTempValue, ac.toCommon().sensorTemperature); + + ac.setRaw(0xB21F88); + EXPECT_EQ( + "Power: On, Mode: 2 (Auto), Fan: 0 (Auto0), Temp: 28C, " + "Zone Follow: Off, Sensor Temp: Off", + ac.toString()); + EXPECT_EQ(kNoTempValue, ac.toCommon().sensorTemperature); + ac.setRaw(0xB27BE0); + EXPECT_EQ( + "Power: Off", + ac.toString()); + EXPECT_EQ(kNoTempValue, ac.toCommon().sensorTemperature); +} diff --git a/lib/lib_basic/IRremoteESP8266/library.json b/lib/lib_basic/IRremoteESP8266/library.json index 476000469..87c32e687 100644 --- a/lib/lib_basic/IRremoteESP8266/library.json +++ b/lib/lib_basic/IRremoteESP8266/library.json @@ -1,6 +1,6 @@ { "name": "IRremoteESP8266", - "version": "2.8.5", + "version": "2.8.6", "keywords": "infrared, ir, remote, esp8266, esp32", "description": "Send and receive infrared signals with multiple protocols (ESP8266/ESP32)", "repository":