Commit 981ae3f1 authored by Alessandro Rubini's avatar Alessandro Rubini

tools/fmc-fdelay-pulse: report times to the user after parsing

This should in a way fix the missing error checks in parse_time,
without forcing us to rewrite parsing with more stringent checks.

Times are reported before activating rather than after each parse
action, so the user can see what 1mhz or pps turn out to be, as
well as the default values.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 7beb4a65
......@@ -343,6 +343,12 @@ int main(int argc, char **argv)
if (current_board_time.coarse > COARSE_PER_SEC * 9 / 10)
p.start.utc++;
}
/* Report to user how parsing turned out to be */
tools_report_time("start time: ", &p.start, TOOLS_UMODE_USER);
tools_report_time("pulse width:", &t_width, TOOLS_UMODE_USER);
tools_report_time("period: ", &p.loop, TOOLS_UMODE_USER);
/* End is start + width, in every situation */
p.end = ts_add(p.start, t_width);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment