Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
552ff809
Commit
552ff809
authored
10 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
Fix NSH timeout logic
parent
d805d6aa
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
src/systemcmds/nshterm/nshterm.c
+4
-6
4 additions, 6 deletions
src/systemcmds/nshterm/nshterm.c
with
4 additions
and
6 deletions
src/systemcmds/nshterm/nshterm.c
+
4
−
6
View file @
552ff809
...
...
@@ -66,20 +66,18 @@ nshterm_main(int argc, char *argv[])
int
fd
=
-
1
;
int
armed_fd
=
orb_subscribe
(
ORB_ID
(
actuator_armed
));
struct
actuator_armed_s
armed
;
/* we assume the system does not provide arming status feedback */
bool
armed_updated
=
false
;
/* try t
he first 30 seconds or if arming system is ready
*/
while
(
(
retries
<
300
)
||
armed_updated
)
{
/* try t
o bring up the console - stop doing so if the system gets armed
*/
while
(
true
)
{
/* abort if an arming topic is published and system is armed */
bool
updated
=
false
;
if
(
orb_check
(
armed_fd
,
&
updated
))
{
orb_check
(
armed_fd
,
&
updated
)
if
(
updated
)
{
/* the system is now providing arming status feedback.
* instead of timing out, we resort to abort bringing
* up the terminal.
*/
armed_updated
=
true
;
orb_copy
(
ORB_ID
(
actuator_armed
),
armed_fd
,
&
armed
);
if
(
armed
.
armed
)
{
...
...
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