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
6d0329b0
Commit
6d0329b0
authored
13 years ago
by
Jason Short
Browse files
Options
Downloads
Patches
Plain Diff
added notes, removed redundant save wp_total
parent
817e7442
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
ArduCopter/control_modes.pde
+8
-4
8 additions, 4 deletions
ArduCopter/control_modes.pde
with
8 additions
and
4 deletions
ArduCopter/control_modes.pde
+
8
−
4
View file @
6d0329b0
...
@@ -111,6 +111,7 @@ static void read_trim_switch()
...
@@ -111,6 +111,7 @@ static void read_trim_switch()
trim_flag
=
false
;
trim_flag
=
false
;
if
(
control_mode
==
AUTO
){
if
(
control_mode
==
AUTO
){
// reset the mission
CH7_wp_index
=
0
;
CH7_wp_index
=
0
;
g
.
command_total
.
set_and_save
(
1
);
g
.
command_total
.
set_and_save
(
1
);
return
;
return
;
...
@@ -118,7 +119,7 @@ static void read_trim_switch()
...
@@ -118,7 +119,7 @@ static void read_trim_switch()
if
(
CH7_wp_index
==
0
){
if
(
CH7_wp_index
==
0
){
// this is our first WP, let's save WP 1 as a takeoff
// this is our first WP, let's save WP 1 as a takeoff
// increment index
// increment index
to WP index of 1 (home is stored at 0)
CH7_wp_index
=
1
;
CH7_wp_index
=
1
;
// set our location ID to 16, MAV_CMD_NAV_WAYPOINT
// set our location ID to 16, MAV_CMD_NAV_WAYPOINT
...
@@ -134,7 +135,7 @@ static void read_trim_switch()
...
@@ -134,7 +135,7 @@ static void read_trim_switch()
// increment index
// increment index
CH7_wp_index
++
;
CH7_wp_index
++
;
// set the next_WP
, 0 is Home so we don't set that
// set the next_WP
(home is stored at 0)
// max out at 100 since I think we need to stay under the EEPROM limit
// max out at 100 since I think we need to stay under the EEPROM limit
CH7_wp_index
=
constrain
(
CH7_wp_index
,
1
,
100
);
CH7_wp_index
=
constrain
(
CH7_wp_index
,
1
,
100
);
...
@@ -149,8 +150,11 @@ static void read_trim_switch()
...
@@ -149,8 +150,11 @@ static void read_trim_switch()
// save command
// save command
set_cmd_with_index
(
current_loc
,
CH7_wp_index
);
set_cmd_with_index
(
current_loc
,
CH7_wp_index
);
// save the index
// 0 = home
g
.
command_total
.
set_and_save
(
CH7_wp_index
+
1
);
// 1 = takeoff
// 2 = WP 2
// 3 = command total
}
}
}
}
}
}
...
...
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