From 95eab03cca00d71c839a8f265ca0d9fbf3b41c44 Mon Sep 17 00:00:00 2001 From: ukw Date: Tue, 6 Nov 2012 10:20:07 +0000 Subject: [PATCH 1/1] Version 2.3.2: improved detection of DENON frames git-svn-id: svn://mikrocontroller.net/irmp@107 aeb2e35e-bfc4-4214-b83c-9e8de998ed28 --- README.txt | 2 +- irmp.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 354a56b..d431f7e 100644 --- a/README.txt +++ b/README.txt @@ -1,7 +1,7 @@ IRMP - Infrared Multi Protocol Decoder -------------------------------------- -Version IRMP: 2.3.1 26.10.2012 +Version IRMP: 2.3.2 06.11.2012 Version IRSND: 2.3.2 29.10.2012 Dokumentation: diff --git a/irmp.c b/irmp.c index a921aac..ab3d59f 100644 --- a/irmp.c +++ b/irmp.c @@ -3,7 +3,7 @@ * * Copyright (c) 2009-2012 Frank Meyer - frank(at)fli4l.de * - * $Id: irmp.c,v 1.129 2012/10/26 08:09:37 fm Exp $ + * $Id: irmp.c,v 1.130 2012/11/06 10:19:41 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -3070,9 +3070,17 @@ irmp_ISR (void) } else { - ANALYZE_PRINTF ("%8.3fms waiting for inverted command repetition\n", (double) (time_counter * 1000) / F_INTERRUPTS); + if ((irmp_tmp_command & 0x03) == 0) + { + ANALYZE_PRINTF ("%8.3fms waiting for inverted command repetition\n", (double) (time_counter * 1000) / F_INTERRUPTS); + last_irmp_denon_command = irmp_tmp_command; + } + else + { + ANALYZE_PRINTF ("%8.3fms got unexpected inverted command, ignoring it\n", (double) (time_counter * 1000) / F_INTERRUPTS); + last_irmp_denon_command = 0; + } irmp_ir_detected = FALSE; - last_irmp_denon_command = irmp_tmp_command; repetition_len = 0; } } @@ -3804,6 +3812,7 @@ main (int argc, char ** argv) else if (ch == '\n') { IRMP_PIN = 0xff; + time_counter = 0; if (list && pause > 0) { @@ -3823,6 +3832,8 @@ main (int argc, char ** argv) } else if (ch == '#') { + time_counter = 0; + if (analyze) { while ((ch = getchar()) != '\n' && ch != EOF) -- 2.39.2