Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuttx-apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
nuttx-apps
Commits
f738166b
Commit
f738166b
authored
9 years ago
by
=?UTF-8?B?6ZmI5p6X6aOe?=
Committed by
Gregory Nutt
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
examples/watchdog: Some fixes to help text and ping time range
parent
6d8e81e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/watchdog/watchdog_main.c
+4
-4
4 additions, 4 deletions
examples/watchdog/watchdog_main.c
with
4 additions
and
4 deletions
examples/watchdog/watchdog_main.c
+
4
−
4
View file @
f738166b
...
...
@@ -95,9 +95,9 @@ static void wdog_help(void)
printf
(
"timer. Ping for the watchdog for <pingtime> seconds, then let it expire.
\n
"
);
printf
(
"
\n
Options include:
\n
"
);
printf
(
" [-d <pingtime>] = Selects the <delay> time in milliseconds. Default: %d
\n
"
,
CONFIG_EXAMPLES_WATCHDOG_PINGTIME
);
printf
(
" [-p <pingdelay] = Time delay between pings in milliseconds. Default: %d
\n
"
,
CONFIG_EXAMPLES_WATCHDOG_PINGDELAY
);
printf
(
" [-p <pingdelay] = Time delay between pings in milliseconds. Default: %d
\n
"
,
CONFIG_EXAMPLES_WATCHDOG_PINGTIME
);
printf
(
" [-t timeout] = Time in milliseconds that the example will ping the watchdog
\n
"
);
printf
(
" before letting the watchdog expire. Default: %d
\n
"
,
CONFIG_EXAMPLES_WATCHDOG_TIMEOUT
);
...
...
@@ -178,13 +178,13 @@ static void parse_args(FAR struct wdog_example_s *wdog, int argc, FAR char **arg
case
'p'
:
nargs
=
arg_decimal
(
&
argv
[
index
],
&
value
);
if
(
value
<
1
||
value
>
99
)
if
(
value
<
1
||
value
>
INT_MAX
)
{
printf
(
"Ping time out of range: %ld
\n
"
,
value
);
exit
(
EXIT_FAILURE
);
}
wdog
->
pingtime
=
(
uint
8
_t
)
value
;
wdog
->
pingtime
=
(
uint
32
_t
)
value
;
index
+=
nargs
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment