Skip to content

Fixed the bug where the wind speed was always set to auto.#2237

Merged
crankyoldgit merged 1 commit into
crankyoldgit:masterfrom
KingingWang:master
Jan 1, 2026
Merged

Fixed the bug where the wind speed was always set to auto.#2237
crankyoldgit merged 1 commit into
crankyoldgit:masterfrom
KingingWang:master

Conversation

@KingingWang

Copy link
Copy Markdown
Contributor

#2236
Fixed a bug where the wind speed was always set to auto. The reason is that after setting the wind speed once, it would automatically change the wind speed back to auto due to setting quiet mode.

@KingingWang

Copy link
Copy Markdown
Contributor Author

The code below will set the wind speed

ac->setFan(ac->convertFan(fan));

After the wind speed is set, the quiet mode will be set again to reset the wind speed.
ac->setQuiet(quiet);

After modifying the code, the wind speed can be controlled normally.

@crankyoldgit crankyoldgit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me.
It would be nice to have a unit test that confirms/shows this working the way it is expected to.

@crankyoldgit crankyoldgit merged commit 5080851 into crankyoldgit:master Jan 1, 2026
42 checks passed
@KingingWang

Copy link
Copy Markdown
Contributor Author

Looks okay to me. It would be nice to have a unit test that confirms/shows this working the way it is expected to.

I have tested that it can normally control the wind speed of my air conditioner. But how should I write unit tests?

@crankyoldgit

Copy link
Copy Markdown
Owner

Looks okay to me. It would be nice to have a unit test that confirms/shows this working the way it is expected to.

I have tested that it can normally control the wind speed of my air conditioner. But how should I write unit tests?

Capture what the real remote generates. i.e. the array code etc. for both cases. (for when quiet is on & off etc) and then use the library to construct the message using the functions/methods in the order etc you'd expect, and confirm that it produces the correct/same message.

e.g. Similar to this unit test in ir_Argo_test.cpp:

TEST(TestArgoAC_WREM3Class, MessageConstructon_ACControl) {
IRArgoAC_WREM3 ac(kGpioUnused);
ac.setChannel(0);
ac.setPower(true);
ac.setMode(argoMode_t::COOL);
ac.setTemp(22);
ac.setSensorTemp(26);
ac.setFan(argoFan_t::FAN_AUTO);
ac.setFlap(argoFlap_t::FLAP_FULL);
ac.setiFeel(false);
ac.setNight(false);
ac.setEco(false);
ac.setMax(false);
ac.setFilter(false);
ac.setLight(true);
auto expected = std::vector<uint8_t>({
0x0B, 0x36, 0x12, 0x0F, 0xC2, 0x24});
auto actual = ac.getRaw();
ASSERT_EQ(ac.getRawByteLength(), kArgo3AcControlStateLength);
EXPECT_THAT(std::vector<uint8_t>(actual, actual + ac.getRawByteLength()),
::testing::ElementsAreArray(expected));
EXPECT_EQ(
"Command[CH#0]: Model: 2 (WREM3), Power: On, Mode: 1 (Cool), Temp: 22C, "
"Sensor Temp: 26C, Fan: 0 (Auto), Swing(V): 7 (Breeze), IFeel: Off, "
"Night: Off, Econo: Off, Max: Off, Filter: Off, Light: On",
ac.toString());
}

@KingingWang

Copy link
Copy Markdown
Contributor Author

Looks okay to me. It would be nice to have a unit test that confirms/shows this working the way it is expected to.

I have tested that it can normally control the wind speed of my air conditioner. But how should I write unit tests?

Capture what the real remote generates. i.e. the array code etc. for both cases. (for when quiet is on & off etc) and then use the library to construct the message using the functions/methods in the order etc you'd expect, and confirm that it produces the correct/same message.

e.g. Similar to this unit test in ir_Argo_test.cpp:

TEST(TestArgoAC_WREM3Class, MessageConstructon_ACControl) {
IRArgoAC_WREM3 ac(kGpioUnused);
ac.setChannel(0);
ac.setPower(true);
ac.setMode(argoMode_t::COOL);
ac.setTemp(22);
ac.setSensorTemp(26);
ac.setFan(argoFan_t::FAN_AUTO);
ac.setFlap(argoFlap_t::FLAP_FULL);
ac.setiFeel(false);
ac.setNight(false);
ac.setEco(false);
ac.setMax(false);
ac.setFilter(false);
ac.setLight(true);
auto expected = std::vector<uint8_t>({
0x0B, 0x36, 0x12, 0x0F, 0xC2, 0x24});
auto actual = ac.getRaw();
ASSERT_EQ(ac.getRawByteLength(), kArgo3AcControlStateLength);
EXPECT_THAT(std::vector<uint8_t>(actual, actual + ac.getRawByteLength()),
::testing::ElementsAreArray(expected));
EXPECT_EQ(
"Command[CH#0]: Model: 2 (WREM3), Power: On, Mode: 1 (Cool), Temp: 22C, "
"Sensor Temp: 26C, Fan: 0 (Auto), Swing(V): 7 (Breeze), IFeel: Off, "
"Night: Off, Econo: Off, Max: Off, Filter: Off, Light: On",
ac.toString());
}

Thank you for your reply. I will look into how the test code works later.

crankyoldgit added a commit that referenced this pull request Jan 2, 2026
**[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)
@crankyoldgit crankyoldgit mentioned this pull request Jan 2, 2026
crankyoldgit added a commit that referenced this pull request Jan 2, 2026
**[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)
@crankyoldgit crankyoldgit mentioned this pull request Jan 2, 2026
crankyoldgit added a commit that referenced this pull request Jan 2, 2026
_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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants