@@ -104,7 +104,7 @@ TEST(TestArgoACClass, MessageConstructon) {
104104 auto expected = std::vector<uint8_t >({
105105 0xAC , 0xF5 , 0x00 , 0x24 , 0x02 , 0x00 , 0x00 , 0x00 , 0x00 , 0xAC , 0xD6 , 0x01 });
106106 auto actual = ac.getRaw ();
107- EXPECT_THAT (std::vector<uint8_t >(actual, actual + kArgoBits / 8 ),
107+ EXPECT_THAT (std::vector<uint8_t >(actual, actual + static_cast < uint8_t >( ceil ( static_cast < float >( kArgoBits ) / 8.0 )) ),
108108 ::testing::ElementsAreArray (expected));
109109 EXPECT_EQ (
110110 " Model: 1 (WREM2), Power: On, Mode: 0 (Cool), Fan: 0 (Auto), Temp: 20C, "
@@ -1461,6 +1461,50 @@ TEST(TestDecodeArgo, RealShortDecode) {
14611461 EXPECT_EQ (28 , r.sensorTemperature );
14621462}
14631463
1464+ TEST (TestDecodeArgo, Issue2133_90bit_message) {
1465+ IRsendTest irsend (kGpioUnused );
1466+ IRrecv irrecv (kGpioUnused );
1467+ irsend.begin ();
1468+
1469+ // Full Argo command message (90 bits)
1470+ const uint16_t command_90bit[193 ] = {
1471+ 6422 , 3190 , 408 , 872 , 428 , 848 , 428 , 2126 , 402 , 2150 , 408 , 872 , 404 , 2152 , 402 , 874 , 402 ,
1472+ 2152 , 402 , 2154 , 406 , 872 , 428 , 2126 , 404 , 876 , 404 , 2150 , 430 , 2124 , 432 , 2122 , 432 , 2124 ,
1473+ 404 , 874 , 404 , 874 , 426 , 852 , 428 , 850 , 412 , 864 , 406 , 872 , 404 , 874 , 400 , 2154 , 428 , 2128 ,
1474+ 402 , 876 , 402 , 874 , 400 , 2154 , 404 , 2150 , 406 , 2150 , 400 , 878 , 400 , 876 , 402 , 874 , 416 , 2136 ,
1475+ 404 , 2152 , 402 , 876 , 402 , 874 , 402 , 874 , 428 , 852 , 402 , 874 , 404 , 872 , 400 , 876 , 402 , 876 ,
1476+ 404 , 872 , 430 , 846 , 402 , 2152 , 406 , 2150 , 406 , 2150 , 404 , 874 , 432 , 846 , 426 , 850 , 428 , 850 ,
1477+ 400 , 878 , 398 , 876 , 404 , 874 , 404 , 874 , 400 , 2152 , 432 , 2124 , 428 , 2128 , 432 , 846 , 426 , 852 ,
1478+ 400 , 2154 , 404 , 874 , 426 , 2128 , 428 , 2128 , 404 , 872 , 430 , 848 , 426 , 2128 , 404 , 872 , 414 , 2140 ,
1479+ 432 , 848 , 400 , 876 , 426 , 850 , 404 , 872 , 402 , 876 , 400 , 876 , 430 , 848 , 404 , 872 , 404 , 874 , 402 ,
1480+ 2154 , 402 , 876 , 428 , 2126 , 406 , 872 , 426 , 2128 , 426 , 852 , 404 , 872 , 430 , 2124 , 404 , 874 , 430 ,
1481+ 846 , 426 , 2128 , 400
1482+ }; // ARGO WREM2 (off command)
1483+
1484+ irsend.reset ();
1485+ uint8_t expectedState[kArgoStateLength ] = {
1486+ 0xAC , 0xF5 , 0x80 , 0x39 , 0x06 , 0xE0 , 0x00 , 0xA7 , 0x29 , 0x80 , 0x4A , 0x02 };
1487+ irsend.sendRaw (command_90bit, sizeof (command_90bit) / sizeof (command_90bit[0 ]), 38 );
1488+ irsend.makeDecodeResult ();
1489+ EXPECT_TRUE (irrecv.decode (&irsend.capture ));
1490+ EXPECT_EQ (decode_type_t ::ARGO, irsend.capture .decode_type );
1491+ EXPECT_EQ (kArgoBits , irsend.capture .bits );
1492+ EXPECT_STATE_EQ (expectedState, irsend.capture .state , irsend.capture .bits );
1493+ EXPECT_EQ (
1494+ " Model: 1 (WREM2), Power: Off, Mode: 0 (Cool), Fan: 3 (Max), Temp: 10C, Sensor Temp: 21C, Max: Off, IFeel: On, Night: Off" ,
1495+ IRAcUtils::resultAcToString (&irsend.capture ));
1496+ stdAc::state_t r, p;
1497+ EXPECT_TRUE (IRAcUtils::decodeToState (&irsend.capture , &r, &p));
1498+ EXPECT_EQ (stdAc::ac_command_t ::kControlCommand , r.command );
1499+
1500+ EXPECT_EQ (21 , r.sensorTemperature ); // Note: This may be off by 1 per the report in #2133
1501+ EXPECT_TRUE (r.iFeel );
1502+ EXPECT_FALSE (r.power );
1503+ EXPECT_EQ (10 , r.degrees );
1504+ EXPECT_EQ (stdAc::opmode_t ::kCool , r.mode );
1505+ }
1506+
1507+
14641508// /
14651509// / @brief Test Fixture for recorded tests
14661510// /
0 commit comments