diff options
-rw-r--r-- | IR-Data/test-suite.sh | 1 | ||||
-rw-r--r-- | README.txt | 2 | ||||
-rw-r--r-- | irmp.c | 28 |
3 files changed, 29 insertions, 2 deletions
diff --git a/IR-Data/test-suite.sh b/IR-Data/test-suite.sh index 0511870..2d7dd67 100644 --- a/IR-Data/test-suite.sh +++ b/IR-Data/test-suite.sh @@ -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 \ @@ -1,7 +1,7 @@ IRMP - Infrared Multi Protocol Decoder
--------------------------------------
-Version IRMP: 3.0.4 2016-11-18
+Version IRMP: 3.0.5 2016-12-16
Version IRSND: 3.0.5 2016-11-18
Documentation:
@@ -3,7 +3,7 @@ *
* Copyright (c) 2009-2016 Frank Meyer - frank(at)fli4l.de
*
- * $Id: irmp.c,v 1.188 2016/09/14 06:31:48 fm Exp $
+ * $Id: irmp.c,v 1.190 2016/12/16 09:18:11 fm Exp $
*
* Supported AVR mikrocontrollers:
*
@@ -3944,6 +3944,32 @@ irmp_ISR (void) {
irmp_bit++;
}
+#if IRMP_SUPPORT_NEC_PROTOCOL == 1
+ else if ((irmp_param.protocol == IRMP_NEC_PROTOCOL || irmp_param.protocol == IRMP_NEC42_PROTOCOL) && irmp_bit == 0)
+ { // it was a non-standard repetition frame
+#ifdef ANALYZE // with 4500µs pause instead of 2250µs
+ ANALYZE_PRINTF ("Detected non-standard repetition frame, switching to NEC repetition\n");
+#endif // ANALYZE
+ if (key_repetition_len < NEC_FRAME_REPEAT_PAUSE_LEN_MAX)
+ {
+ irmp_param.stop_bit = TRUE; // set flag
+ irmp_param.protocol = IRMP_NEC_PROTOCOL; // switch protocol
+ irmp_param.complete_len = irmp_bit; // patch length: 16 or 17
+ irmp_tmp_address = last_irmp_address; // address is last address
+ irmp_tmp_command = last_irmp_command; // command is last command
+ irmp_flags |= IRMP_FLAG_REPETITION;
+ key_repetition_len = 0;
+ }
+ else
+ {
+#ifdef ANALYZE
+ ANALYZE_PRINTF ("ignoring NEC repetition frame: timeout occured, key_repetition_len = %d > %d\n",
+ key_repetition_len, NEC_FRAME_REPEAT_PAUSE_LEN_MAX);
+#endif // ANALYZE
+ irmp_ir_detected = FALSE;
+ }
+ }
+#endif // IRMP_SUPPORT_NEC_PROTOCOL == 1
#if IRMP_SUPPORT_JVC_PROTOCOL == 1
else if (irmp_param.protocol == IRMP_NEC_PROTOCOL && (irmp_bit == 16 || irmp_bit == 17)) // it was a JVC stop bit
{
|