From ac987aab8a4bd8c884f88b5214684f652c12f4eb Mon Sep 17 00:00:00 2001 From: crankyoldgit Date: Mon, 15 May 2023 00:05:55 +1000 Subject: [PATCH] Ensure the `sleep` parameter is used for the `FUJITSU_AC` protocol. It seems we were not passing it on in the `IRac` class. Fixes #1991 --- src/IRac.cpp | 2 +- test/IRac_test.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/IRac.cpp b/src/IRac.cpp index 4075e2c5a..adfa87f64 100644 --- a/src/IRac.cpp +++ b/src/IRac.cpp @@ -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 diff --git a/test/IRac_test.cpp b/test/IRac_test.cpp index 32a745a31..8d6274c65 100644 --- a/test/IRac_test.cpp +++ b/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));