Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
OpenSource
Ardupilot
Commits
60a6fed3
Commit
60a6fed3
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
APM_OBC: don't use _saved_wp when zero
parent
fc942b2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/APM_OBC/APM_OBC.cpp
+8
-2
8 additions, 2 deletions
libraries/APM_OBC/APM_OBC.cpp
libraries/APM_OBC/APM_OBC.h
+1
-0
1 addition, 0 deletions
libraries/APM_OBC/APM_OBC.h
with
9 additions
and
2 deletions
libraries/APM_OBC/APM_OBC.cpp
+
8
−
2
View file @
60a6fed3
...
...
@@ -130,7 +130,10 @@ APM_OBC::check(APM_OBC::control_mode mode,
}
else
if
(
gcs_link_ok
)
{
_state
=
STATE_AUTO
;
gcs_send_text_fmt
(
PSTR
(
"GCS OK"
));
change_command
(
_saved_wp
);
if
(
_saved_wp
!=
0
)
{
change_command
(
_saved_wp
);
_saved_wp
=
0
;
}
}
break
;
...
...
@@ -143,7 +146,10 @@ APM_OBC::check(APM_OBC::control_mode mode,
}
else
if
(
gps_lock_ok
)
{
gcs_send_text_fmt
(
PSTR
(
"GPS OK"
));
_state
=
STATE_AUTO
;
change_command
(
_saved_wp
);
if
(
_saved_wp
!=
0
)
{
change_command
(
_saved_wp
);
_saved_wp
=
0
;
}
}
break
;
}
...
...
This diff is collapsed.
Click to expand it.
libraries/APM_OBC/APM_OBC.h
+
1
−
0
View file @
60a6fed3
...
...
@@ -43,6 +43,7 @@ public:
// auto mission when a failsafe condition is resolved
enum
ap_var_type
var_type
;
_command_index
=
(
AP_Int8
*
)
AP_Param
::
find
(
"CMD_INDEX"
,
&
var_type
);
_saved_wp
=
0
;
}
void
check
(
enum
control_mode
control_mode
,
...
...
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