diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-07-01 07:55:25 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-07-01 08:01:51 +0200 |
commit | 42a4dff95f2291c07a59a589646796e70ee5e7f9 (patch) | |
tree | e15c182865e46e7932d0234a81cae479f13eaf7c | |
parent | c4e0bd71a7f6a737a98f8eef86c417e61051240f (diff) | |
download | v4l-utils-42a4dff95f2291c07a59a589646796e70ee5e7f9.tar.gz |
cec-ctl: log signal free time when (show && !verbose)
The logging of the signal free time was no longer done when
show == true and verbose == false, fix the logic.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 8639ff89 ("cec-ctl: report low drive without --verbose")
-rw-r--r-- | utils/cec-ctl/cec-pin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/cec-ctl/cec-pin.cpp b/utils/cec-ctl/cec-pin.cpp index f890d2a0..cf4b6d34 100644 --- a/utils/cec-ctl/cec-pin.cpp +++ b/utils/cec-ctl/cec-pin.cpp @@ -386,9 +386,10 @@ void log_event_pin(bool is_high, __u64 ev_ts, bool show) } else { verb_printf("0 -> 1\n"); } - } else if (!is_high && bit_periods > 1 && bit_periods < 10 && show) { - printf("%s: signal free time = %.1f bit periods\n", - ts2s(ts).c_str(), bit_periods); + + if (!verbose && !is_high && bit_periods > 1 && bit_periods < 10) + printf("%s: signal free time = %.1f bit periods\n", + ts2s(ts).c_str(), bit_periods); } cec_pin_debug(ev_ts, (ev_ts - last_ts) / 1000, was_high, is_high, show); last_change_ts = ev_ts; |