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