Skip to content

Commit

Permalink
Ensure the sleep parameter is used for the FUJITSU_AC protocol.
Browse files Browse the repository at this point in the history
It seems we were not passing it on in the `IRac` class.
Fixes #1991
  • Loading branch information
crankyoldgit committed May 14, 2023
1 parent 03885a6 commit ac987aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3234,7 +3234,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
Expand Down
11 changes: 7 additions & 4 deletions test/IRac_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand All @@ -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));
Expand Down

0 comments on commit ac987aa

Please # to comment.