aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2022-01-21 10:51:16 +0000
committerSean Young <sean@mess.org>2022-01-28 15:28:46 +0000
commitd124ef52870a0f627d206db31c1b1a59f4c876ed (patch)
tree18c2ee5d877e0933bf8a0e97eba14827bac26435
parentd18ba0d8984639ac2c5c8eeca53467d4f7919d98 (diff)
downloadv4l-utils-d124ef52870a0f627d206db31c1b1a59f4c876ed.tar.gz
ir-ctl: report ir overflow
Signed-off-by: Sean Young <sean@mess.org>
-rw-r--r--utils/ir-ctl/ir-ctl.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 27c309f9..240a3752 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -1197,13 +1197,18 @@ int lirc_receive(struct arguments *args, int fd, unsigned features)
case LIRC_MODE2_FREQUENCY:
fprintf(out, "carrier %u\n", val);
break;
+ case LIRC_MODE2_OVERFLOW:
+ fprintf(out, "overflow\n");
+ leading_space = true;
+ break;
}
} else {
switch (msg) {
case LIRC_MODE2_TIMEOUT:
- fprintf(out, "-%u\n", val);
if (carrier)
- fprintf(out, " # carrier %uHz, timeout %u\n", carrier, val);
+ fprintf(out, "-%u # carrier %uHz\n", val, carrier);
+ else
+ fprintf(out, "-%u\n", val);
leading_space = true;
carrier = 0;
break;
@@ -1216,6 +1221,14 @@ int lirc_receive(struct arguments *args, int fd, unsigned features)
case LIRC_MODE2_FREQUENCY:
carrier = val;
break;
+ case LIRC_MODE2_OVERFLOW:
+ if (carrier)
+ fprintf(out, "# carrier %uHz, overflow\n", carrier);
+ else
+ fprintf(out, "# overflow\n");
+ leading_space = true;
+ carrier = 0;
+ break;
}
}