Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
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
Baitboat
Commits
03733e28
Commit
03733e28
authored
12 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: bug fix to altitude check of verify takeoff
set_next_WP function was not setting the alt_change_flag properly
parent
c7482107
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArduCopter/commands.pde
+6
-14
6 additions, 14 deletions
ArduCopter/commands.pde
with
6 additions
and
14 deletions
ArduCopter/commands.pde
+
6
−
14
View file @
03733e28
...
...
@@ -129,9 +129,6 @@ static int32_t get_RTL_alt()
static
void
set_next_WP
(
struct
Location
*
wp
)
{
//SendDebug("MSG <set_next_wp> wp_index: ");
//SendDebugln(g.command_index, DEC);
// copy the current WP into the OldWP slot
// ---------------------------------------
if
(
next_WP
.
lat
==
0
||
command_nav_index
<=
1
)
{
...
...
@@ -143,20 +140,15 @@ static void set_next_WP(struct Location *wp)
prev_WP
=
current_loc
;
}
//cliSerial->printf("set_next_WP #%d, ", command_nav_index);
//print_wp(&prev_WP, command_nav_index -1);
// Load the next_WP slot
// ---------------------
next_WP
=
*
wp
;
// used to control and limit the rate of climb
// -------------------------------------------
// We don't set next WP below 1m
next_WP
.
alt
=
max
(
next_WP
.
alt
,
100
);
next_WP
.
options
=
wp
->
options
;
next_WP
.
lat
=
wp
->
lat
;
next_WP
.
lng
=
wp
->
lng
;
// Save new altitude so we can track it for climb_rate
set_new_altitude
(
next_WP
.
alt
);
// Set new target altitude so we can track it for climb_rate
// To-Do: remove the restriction on negative altitude targets (after testing)
set_new_altitude
(
max
(
wp
->
alt
,
100
));
// this is handy for the groundstation
// -----------------------------------
...
...
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