]> cloudbase.mooo.com Git - irmp.git/commitdiff
Version 3.0.5: added support of non-standard NEC repetition frames with pause of...
authorukw <ukw@aeb2e35e-bfc4-4214-b83c-9e8de998ed28>
Fri, 16 Dec 2016 09:20:08 +0000 (09:20 +0000)
committerukw <ukw@aeb2e35e-bfc4-4214-b83c-9e8de998ed28>
Fri, 16 Dec 2016 09:20:08 +0000 (09:20 +0000)
git-svn-id: svn://mikrocontroller.net/irmp@180 aeb2e35e-bfc4-4214-b83c-9e8de998ed28

IR-Data/test-suite.sh
README.txt
irmp.c

index 0511870ea26d57ad5b5bda2fda70d60ca96e5b3d..2d7dd6789be6963df42a53eed3f6244e3bfebc2a 100644 (file)
@@ -55,6 +55,7 @@ for j in                            \
     nec-repetition.txt              \
     nec-skymaster-dt500.txt         \
     nec.txt                         \
+    nec-non-std-rep.txt             \
     nikon.txt                       \
     nubert-subwoofer.txt            \
     orion_vcr_07660BM070.txt        \
index 623acd7b06fdb88b404f1055205720073fa1db42..495e49151ce87acea17eb8a96f017d42c76268dd 100644 (file)
@@ -1,7 +1,7 @@
 IRMP - Infrared Multi Protocol Decoder\r
 --------------------------------------\r
 \r
-Version IRMP:  3.0.4 2016-11-18\r
+Version IRMP:  3.0.5 2016-12-16\r
 Version IRSND: 3.0.5 2016-11-18\r
 \r
 Documentation:\r
diff --git a/irmp.c b/irmp.c
index 6297aa5905cb6f83653d2d351547e353dd9d61d0..27c31be1e10ac037198441d3f609ecb89eb8ab9f 100644 (file)
--- a/irmp.c
+++ b/irmp.c
@@ -3,7 +3,7 @@
  *\r
  * Copyright (c) 2009-2016 Frank Meyer - frank(at)fli4l.de\r
  *\r
- * $Id: irmp.c,v 1.188 2016/09/14 06:31:48 fm Exp $\r
+ * $Id: irmp.c,v 1.190 2016/12/16 09:18:11 fm Exp $\r
  *\r
  * Supported AVR mikrocontrollers:\r
  *\r
@@ -3944,6 +3944,32 @@ irmp_ISR (void)
                             {\r
                                 irmp_bit++;\r
                             }\r
+#if IRMP_SUPPORT_NEC_PROTOCOL == 1\r
+                            else if ((irmp_param.protocol == IRMP_NEC_PROTOCOL || irmp_param.protocol == IRMP_NEC42_PROTOCOL) && irmp_bit == 0)\r
+                            {                                                               // it was a non-standard repetition frame\r
+#ifdef ANALYZE                                                                              // with 4500µs pause instead of 2250µs\r
+                                ANALYZE_PRINTF ("Detected non-standard repetition frame, switching to NEC repetition\n");\r
+#endif // ANALYZE\r
+                                if (key_repetition_len < NEC_FRAME_REPEAT_PAUSE_LEN_MAX)\r
+                                {\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
+                                    irmp_tmp_address = last_irmp_address;                   // address is last address\r
+                                    irmp_tmp_command = last_irmp_command;                   // command is last command\r
+                                    irmp_flags |= IRMP_FLAG_REPETITION;\r
+                                    key_repetition_len = 0;\r
+                                }\r
+                                else\r
+                                {\r
+#ifdef ANALYZE\r
+                                    ANALYZE_PRINTF ("ignoring NEC repetition frame: timeout occured, key_repetition_len = %d > %d\n",\r
+                                                    key_repetition_len, NEC_FRAME_REPEAT_PAUSE_LEN_MAX);\r
+#endif // ANALYZE\r
+                                    irmp_ir_detected = FALSE;\r
+                                }\r
+                            }\r
+#endif // IRMP_SUPPORT_NEC_PROTOCOL == 1\r
 #if IRMP_SUPPORT_JVC_PROTOCOL == 1\r
                             else if (irmp_param.protocol == IRMP_NEC_PROTOCOL && (irmp_bit == 16 || irmp_bit == 17))      // it was a JVC stop bit\r
                             {\r