diff --git a/src/IRutils.cpp b/src/IRutils.cpp index e9af0b28f..2ff514264 100644 --- a/src/IRutils.cpp +++ b/src/IRutils.cpp @@ -262,8 +262,8 @@ String resultToSourceCode(const decode_results * const results) { // "uint32_t address = 0xDEADBEEF;\n" // "uint32_t command = 0xDEADBEEF;\n" // "uint64_t data = 0xDEADBEEFDEADBEEF;" = ~116 chars max. - output.reserve(55 + (length * 7) + hasState ? 25 + (results->bits / 8) * 6 - : 116); + output.reserve(55 + (length * 7) + (hasState ? 25 + (results->bits / 8) * 6 + : 116)); // Start declaration output += F("uint16_t "); // variable type output += F("rawData["); // array name diff --git a/src/ir_Coolix.cpp b/src/ir_Coolix.cpp index 6769ebb79..d10144e28 100644 --- a/src/ir_Coolix.cpp +++ b/src/ir_Coolix.cpp @@ -112,8 +112,8 @@ void IRCoolixAC::send(const uint16_t repeat) { // Typically repeat is `kCoolixDefaultRepeat` which is `1`, so this allows // it to be 0 normally for this command, and allows additional repeats if // requested rather always 0 for that command. - _irsend.sendCOOLIX(getRaw(), kCoolixBits, repeat - (getSwingVStep() && - repeat > 0) ? 1 : 0); + _irsend.sendCOOLIX(getRaw(), kCoolixBits, repeat - ((getSwingVStep() && + repeat > 0) ? 1 : 0)); // make sure to remove special state from the internal state // after command has being transmitted. recoverSavedState(); diff --git a/src/ir_LG.cpp b/src/ir_LG.cpp index 94cf01cd6..5b10b7ebd 100644 --- a/src/ir_LG.cpp +++ b/src/ir_LG.cpp @@ -240,6 +240,7 @@ void IRLgAc::stateReset(void) { _light = true; _swingv = kLgAcSwingVOff; _swingh = false; + _swingh_prev = false; for (uint8_t i = 0; i < kLgAcSwingVMaxVanes; i++) _vaneswingv[i] = 0; // Reset to an unused value. updateSwingPrev(); diff --git a/test/ir_Argo_test.cpp b/test/ir_Argo_test.cpp index 817272a17..0705d2839 100644 --- a/test/ir_Argo_test.cpp +++ b/test/ir_Argo_test.cpp @@ -509,7 +509,7 @@ TEST_P(TestArgoConfigViaIRAc_Positive, EXPECT_EQ(state.command, r.command); } -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( TestIrAc, TestArgoConfigViaIRAc_Positive, ::testing::Values( @@ -546,7 +546,7 @@ TEST_P(TestArgoConfigViaIRAc_Negative, ASSERT_EQ(nullptr, irac._lastDecodeResults); // nothing got sent } -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( TestIrAc, TestArgoConfigViaIRAc_Negative, ::testing::Values( @@ -565,7 +565,7 @@ INSTANTIATE_TEST_CASE_P( using IRArgoACBase_typelist = ::testing::Types; template struct TestArgoACBaseClass : public testing::Test {}; -TYPED_TEST_CASE(TestArgoACBaseClass, IRArgoACBase_typelist); +TYPED_TEST_SUITE(TestArgoACBaseClass, IRArgoACBase_typelist); TYPED_TEST(TestArgoACBaseClass, SetAndGetTemp) { @@ -1520,7 +1520,7 @@ TEST_P(TestArgoE2E, RealExampleCommands) { } // Test cases -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( TestDecodeArgo, TestArgoE2E, ::testing::Values( diff --git a/test/ir_Gorenje_test.cpp b/test/ir_Gorenje_test.cpp index 245b29b98..ebeab7680 100644 --- a/test/ir_Gorenje_test.cpp +++ b/test/ir_Gorenje_test.cpp @@ -84,7 +84,7 @@ TEST_P(TestDecodeGorenjeSyntheticSendTestFixture, SyntheticExample) { EXPECT_FALSE(irsend.capture.repeat); } -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( TestDecodeGorenje, TestDecodeGorenjeSyntheticSendTestFixture, ::testing::Values(0x2, 0x8, 0x4, 0x10, 0x20, 0x1)); @@ -112,7 +112,7 @@ TEST_P(TestDecodeGorenjeReceiveTestFixture, RealExample) { EXPECT_FALSE(irsend.capture.repeat); } -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( TestDecodeGorenje, TestDecodeGorenjeReceiveTestFixture, ::testing::Values( diff --git a/test/ir_Hitachi_test.cpp b/test/ir_Hitachi_test.cpp index 51664688a..e6042942d 100644 --- a/test/ir_Hitachi_test.cpp +++ b/test/ir_Hitachi_test.cpp @@ -1831,7 +1831,7 @@ TEST(TestIRHitachiAc1Class, FanSpeedInDryMode) { ac.setPower(true); ac.setPowerToggle(true); ac.setMode(kHitachiAc1Dry); - ac.setTemp(22.5); + ac.setTemp(22); ac.setFan(kHitachiAc1FanLow); ac.setSwingV(false); ac.setSwingH(false);