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

When SEND_LG is true and SEND_SAMSUNG is false compilation fails #2010

Closed
dilyanpalauzov opened this issue Jul 8, 2023 · 4 comments · Fixed by #2011
Closed

When SEND_LG is true and SEND_SAMSUNG is false compilation fails #2010

dilyanpalauzov opened this issue Jul 8, 2023 · 4 comments · Fixed by #2011
Assignees
Labels
bug Pending Confirmation Waiting for confirmation from user

Comments

@dilyanpalauzov
Copy link
Contributor

… because ir_LG.cpp/IRSend::sendLG contains:

    // LG 32bit protocol is near identical to Samsung except for repeats.
    sendSAMSUNG(data, nbits, 0);  // Send it as a single Samsung message.
    repeatHeaderMark = kLg32RptHdrMark;
    duty = 33;
    repeat++;
crankyoldgit added a commit that referenced this issue Jul 8, 2023
`sendSAMSUNG()` is needed by `sendLG()`, so fix the `#ifdef`s appropriately.

i.e. Compilation shouldn't break if `SEND_LG == TRUE` and `SEND_SAMSUNG == FALSE`
Fixes #2010
@crankyoldgit crankyoldgit self-assigned this Jul 8, 2023
@crankyoldgit
Copy link
Owner

crankyoldgit commented Jul 8, 2023

Thanks for the report. Can you please test out PR #2011 to see if that fixes the issue?

@crankyoldgit crankyoldgit added the Pending Confirmation Waiting for confirmation from user label Jul 8, 2023
@dilyanpalauzov
Copy link
Contributor Author

This is also necessary

diff --git a/IRremoteESP8266/src/IRsend.h b/IRremoteESP8266/src/IRsend.h
index f8a447197..a778df309 100644
--- a/IRremoteESP8266/src/IRsend.h
+++ b/IRremoteESP8266/src/IRsend.h
@@ -310,7 +310,7 @@ class IRsend {
   void sendSherwood(uint64_t data, uint16_t nbits = kSherwoodBits,
                     uint16_t repeat = kSherwoodMinRepeat);
 #endif
-#if SEND_SAMSUNG
+#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);

crankyoldgit added a commit that referenced this issue Jul 8, 2023
Also include the compile dependency in `IRsend.h` too.

Ref: #2010 (comment)
@crankyoldgit
Copy link
Owner

@dilyanpalauzov Thanks for that. I totally forgot that bit. I've updated PR #2011. Can you please confirm if the update now covers everything?

@dilyanpalauzov
Copy link
Contributor Author

This looks good. I cannot test the patch 1:1, since I use IRremoteESP8266 within Tasmota, where IRremoteESP8266 is part of the version-controlled code of Tasmota. In any case with the change I provided above, and you have integrated, the code compiles.

Besides, the parentheses after #if are not necessary.

crankyoldgit added a commit that referenced this issue Jul 10, 2023
`sendSAMSUNG()` is needed by `sendLG()`, so fix the `#ifdef`s appropriately.

i.e. Compilation shouldn't break if `SEND_LG == TRUE` and `SEND_SAMSUNG == FALSE`

Fixes #2010
crankyoldgit added a commit that referenced this issue Jul 27, 2023
_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)
crankyoldgit added a commit that referenced this issue Jul 28, 2023
## _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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Pending Confirmation Waiting for confirmation from user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants