+\r
+#if IRMP_SUPPORT_NEC42_PROTOCOL == 1\r
+#if IRMP_SUPPORT_NEC_PROTOCOL == 1\r
+ else if (irmp_param.protocol == IRMP_NEC42_PROTOCOL && irmp_bit == 32) // it was a NEC stop bit\r
+ {\r
+ ANALYZE_PRINTF ("Switching to NEC protocol\n");\r
+ irmp_param.stop_bit = TRUE; // set flag\r
+ irmp_param.protocol = IRMP_NEC_PROTOCOL; // switch protocol\r
+ irmp_param.complete_len = irmp_bit; // patch length: 16 or 17\r
+\r
+ // 0123456789ABC0123456789ABC0123456701234567\r
+ // NEC42: AAAAAAAAAAAAAaaaaaaaaaaaaaCCCCCCCCcccccccc\r
+ // NEC: AAAAAAAAaaaaaaaaCCCCCCCCcccccccc\r
+ irmp_tmp_address |= (irmp_tmp_address2 & 0x0007) << 12;\r
+ irmp_tmp_command = (irmp_tmp_address2 >> 3) | (irmp_tmp_command << 10);\r
+ }\r
+#endif // IRMP_SUPPORT_NEC_PROTOCOL == 1\r
+#if IRMP_SUPPORT_JVC_PROTOCOL == 1\r
+ else if (irmp_param.protocol == IRMP_NEC42_PROTOCOL && irmp_bit == 16) // it was a JVC stop bit\r
+ {\r
+ ANALYZE_PRINTF ("Switching to JVC protocol\n");\r
+ irmp_param.stop_bit = TRUE; // set flag\r
+ irmp_param.protocol = IRMP_JVC_PROTOCOL; // switch protocol\r
+ irmp_param.complete_len = irmp_bit; // patch length: 16 or 17\r
+\r
+ // 0123456789ABC0123456789ABC0123456701234567\r
+ // NEC42: AAAAAAAAAAAAAaaaaaaaaaaaaaCCCCCCCCcccccccc\r
+ // JVC: AAAACCCCCCCCCCCC\r
+ irmp_tmp_command = (irmp_tmp_address >> 4) | (irmp_tmp_address2 << 9); // set command: upper 12 bits are command bits\r
+ irmp_tmp_address = irmp_tmp_address & 0x000F; // lower 4 bits are address bits\r
+ }\r
+#endif // IRMP_SUPPORT_JVC_PROTOCOL == 1\r
+#endif // IRMP_SUPPORT_NEC42_PROTOCOL == 1\r