summaryrefslogtreecommitdiff
path: root/irmp.c
diff options
context:
space:
mode:
authorukw2012-11-06 10:20:07 +0000
committerukw2012-11-06 10:20:07 +0000
commit95eab03cca00d71c839a8f265ca0d9fbf3b41c44 (patch)
tree40140a1117b24a823ebbcd0e8a5ada590f9fa79e /irmp.c
parent4038f0212d7eeaaf1977c5cc57b41c6db89f6e44 (diff)
downloadirmp-95eab03cca00d71c839a8f265ca0d9fbf3b41c44.zip
Version 2.3.2: improved detection of DENON frames
git-svn-id: svn://mikrocontroller.net/irmp@107 aeb2e35e-bfc4-4214-b83c-9e8de998ed28
Diffstat (limited to 'irmp.c')
-rw-r--r--irmp.c17
1 files changed, 14 insertions, 3 deletions
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)