A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/crankyoldgit/IRremoteESP8266/commit/2d4659cd174ee5b555b2ef70e674e54053f282c5 below:

Refactor `decodeMitsubishiAC()` (#1532) · crankyoldgit/IRremoteESP8266@2d4659c · GitHub

@@ -824,134 +824,6 @@ TEST(TestDecodeMitsubishiAC, DecodeRealExample) {

824 824

EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits);

825 825

}

826 826 827 -

// Tests for decodeMitsubishiAC() when the first payload has an error.

828 -

TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatNeeded) {

829 -

IRsendTest irsend(kGpioUnused);

830 -

IRrecv irrecv(kGpioUnused);

831 -

irsend.begin();

832 - 833 -

irsend.reset();

834 -

// Mitsubishi AC "Power On, 16C, low fan, vane auto move".

835 -

uint16_t rawData[583] = {

836 -

3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, 444, 1236,

837 -

440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, 442, 1264, 420, 394,

838 -

444, 394, 442, 1264, 422, 1260, 414, 398, 440, 1266, 418, 1264, 420, 392,

839 -

446, 392, 444, 1264, 422, 392, 446, 392, 446, 1260, 414, 400, 448, 390,

840 -

446, 392, 444, 394, 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446,

841 -

392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, 448, 390,

842 -

446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 440, 400, 438, 400, 448,

843 -

390, 446, 392, 444, 1236, 440, 1266, 418, 394, 442, 396, 440, 398, 438,

844 -

402, 446, 1232, 444, 396, 440, 1268, 418, 394, 442, 396, 440, 398,

845 -

// space 699 is not recognizable:

846 -

440, 400, 448, 390, 448, 1232, 442, 1266, 420, 394, 444, 1264, 699, 1260,

847 -

416, 396, 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264,

848 -

422, 1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, 438, 400,

849 -

446, 392, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 438, 398, 438,

850 -

400, 448, 392, 446, 392, 444, 394, 444, 396, 442, 396, 440, 398, 438, 400,

851 -

448, 390, 448, 392, 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438,

852 -

400, 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398,

853 -

438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 440,

854 -

398, 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398,

855 -

438, 400, 438, 400, 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440,

856 -

398, 438, 1240, 444, 1264, 422, 390, 446, 392, 446, 1260, 414, 1268, 418,

857 -

1264, 422, 12984, 3478, 1708, 418, 1264, 422, 1234, 442, 398, 448, 390,

858 -

446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234, 442, 1266, 420, 392,

859 -

444, 1264, 420, 392, 446, 394, 444, 1236, 448, 1260, 416, 398, 440, 1266,

860 -

418, 1262, 422, 390, 446, 392, 444, 1234, 440, 400, 448, 392, 446, 1234,

861 -

440, 398, 450, 390, 446, 392, 444, 394, 444, 394, 442, 396, 442, 398, 440,

862 -

400, 438, 400, 448, 390, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398,

863 -

438, 400, 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440,

864 -

398, 438, 400, 448, 416, 420, 392, 444, 1234, 440, 1240, 446, 394, 442,

865 -

396, 440, 398, 438, 400, 448, 1232, 444, 396, 440, 1240, 446, 394, 442,

866 -

396, 440, 398, 440, 400, 448, 390, 446, 1232, 444, 1238, 446, 394, 444,

867 -

1236, 448, 1232, 442, 396, 440, 398, 448, 1232, 444, 396, 440, 398, 438,

868 -

1242, 444, 1238, 448, 1234, 442, 1240, 444, 394, 442, 396, 440, 398, 438,

869 -

400, 448, 390, 446, 394, 444, 420, 416, 394, 444, 396, 440, 398, 440, 398,

870 -

438, 400, 448, 418, 420, 418, 418, 394, 442, 396, 442, 396, 440, 424, 412,

871 -

400, 448, 390, 446, 392, 446, 420, 418, 420, 416, 396, 440, 398, 440, 424,

872 -

412, 426, 420, 418, 420, 392, 444, 394, 444, 422, 416, 422, 414, 398, 440,

873 -

426, 422, 388, 448, 416, 420, 418, 418, 422, 416, 422, 414, 424, 414, 398,

874 -

438, 426, 422, 418, 420, 390, 446, 418, 418, 420, 416, 396, 440, 424, 412,

875 -

426, 412, 400, 446, 418, 420, 420, 418, 420, 416, 422, 414, 422, 414, 424,

876 -

412, 426, 422, 390, 446, 1232, 442, 1240, 446, 394, 444, 394, 442, 1238,

877 -

446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B

878 - 879 -

irsend.sendRaw(rawData, 583, 33);

880 -

irsend.makeDecodeResult();

881 - 882 -

ASSERT_TRUE(irrecv.decode(&irsend.capture));

883 -

EXPECT_EQ(MITSUBISHI_AC, irsend.capture.decode_type);

884 -

EXPECT_EQ(kMitsubishiACBits, irsend.capture.bits);

885 -

uint8_t expected[kMitsubishiACStateLength] = {

886 -

0x23, 0xCB, 0x26, 0x01, 0x00, 0x00, 0x18, 0x0A, 0x36,

887 -

0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6};

888 -

EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits);

889 -

}

890 - 891 -

// Tests for decodeMitsubishiAC() when the repeat mark is wrong.

892 -

TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatMarkError) {

893 -

IRsendTest irsend(kGpioUnused);

894 -

IRrecv irrecv(kGpioUnused);

895 -

irsend.begin();

896 - 897 -

irsend.reset();

898 -

// Mitsubishi AC "Power On, 16C, low fan, vane auto move".

899 -

uint16_t rawData[583] = {

900 -

3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, 444, 1236,

901 -

440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, 442, 1264, 420, 394,

902 -

444, 394, 442, 1264, 422, 1260, 414, 398, 440, 1266, 418, 1264, 420, 392,

903 -

446, 392, 444, 1264, 422, 392, 446, 392, 446, 1260, 414, 400, 448, 390,

904 -

446, 392, 444, 394, 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446,

905 -

392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, 448, 390,

906 -

446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 440, 400, 438, 400, 448,

907 -

390, 446, 392, 444, 1236, 440, 1266, 418, 394, 442, 396, 440, 398, 438,

908 -

402, 446, 1232, 444, 396, 440, 1268, 418, 394, 442, 396, 440, 398, 440,

909 -

400, 448, 390, 448, 1232, 442, 1266, 420, 394, 444, 1264, 422, 1260, 416,

910 -

396, 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264, 422,

911 -

1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, 438, 400, 446,

912 -

392, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 438, 398, 438, 400,

913 -

448, 392, 446, 392, 444, 394, 444, 396, 442, 396, 440, 398, 438, 400, 448,

914 -

390, 448, 392, 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400,

915 -

448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438,

916 -

400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 440, 398,

917 -

438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 438,

918 -

400, 438, 400, 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398,

919 -

438, 1240, 444, 1264, 422, 390, 446, 392, 446,

920 -

// Repeat mark (1111) wrong:

921 -

1260, 414, 1268, 418, 1264, 422, 1111, 347, 1708, 418, 1264, 422, 1234,

922 -

442, 398, 448, 390, 446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234,

923 -

442, 1266, 420, 392, 444, 1264, 420, 392, 446, 394, 444, 1236, 448, 1260,

924 -

416, 398, 440, 1266, 418, 1262, 422, 390, 446, 392, 444, 1234, 440, 400,

925 -

448, 392, 446, 1234, 440, 398, 450, 390, 446, 392, 444, 394, 444, 394,

926 -

442, 396, 442, 398, 440, 400, 438, 400, 448, 390, 446, 392, 444, 394, 442,

927 -

396, 442, 396, 440, 398, 438, 400, 448, 390, 446, 392, 446, 392, 444, 394,

928 -

442, 396, 442, 396, 440, 398, 438, 400, 448, 416, 420, 392, 444, 1234,

929 -

440, 1240, 446, 394, 442, 396, 440, 398, 438, 400, 448, 1232, 444, 396,

930 -

440, 1240, 446, 394, 442, 396, 440, 398, 440, 400, 448, 390, 446, 1232,

931 -

444, 1238, 446, 394, 444, 1236, 448, 1232, 442, 396, 440, 398, 448, 1232,

932 -

444, 396, 440, 398, 438, 1242, 444, 1238, 448, 1234, 442, 1240, 444, 394,

933 -

442, 396, 440, 398, 438, 400, 448, 390, 446, 394, 444, 420, 416, 394, 444,

934 -

396, 440, 398, 440, 398, 438, 400, 448, 418, 420, 418, 418, 394, 442, 396,

935 -

442, 396, 440, 424, 412, 400, 448, 390, 446, 392, 446, 420, 418, 420, 416,

936 -

396, 440, 398, 440, 424, 412, 426, 420, 418, 420, 392, 444, 394, 444, 422,

937 -

416, 422, 414, 398, 440, 426, 422, 388, 448, 416, 420, 418, 418, 422, 416,

938 -

422, 414, 424, 414, 398, 438, 426, 422, 418, 420, 390, 446, 418, 418, 420,

939 -

416, 396, 440, 424, 412, 426, 412, 400, 446, 418, 420, 420, 418, 420, 416,

940 -

422, 414, 422, 414, 424, 412, 426, 422, 390, 446, 1232, 442, 1240, 446,

941 -

394, 444, 394, 442, 1238, 446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B

942 - 943 -

irsend.sendRaw(rawData, 583, 33);

944 -

irsend.makeDecodeResult();

945 - 946 -

ASSERT_TRUE(irrecv.decode(&irsend.capture));

947 -

EXPECT_EQ(MITSUBISHI_AC, irsend.capture.decode_type);

948 -

EXPECT_EQ(kMitsubishiACBits, irsend.capture.bits);

949 -

uint8_t expected[kMitsubishiACStateLength] = {

950 -

0x23, 0xCB, 0x26, 0x01, 0x00, 0x00, 0x18, 0x0A, 0x36,

951 -

0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6};

952 -

EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits);

953 -

}

954 - 955 827

// Tests for decodeMitsubishiAC() when first payload has an error and the

956 828

// repeat mark is wrong.

957 829

TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatNeededButError) {


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4