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
5c8b9bf3
Commit
5c8b9bf3
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
Rover: updated for new RC_Channel_aux API
parent
95e4316c
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
APMrover2/radio.pde
+2
-6
2 additions, 6 deletions
APMrover2/radio.pde
with
2 additions
and
6 deletions
APMrover2/radio.pde
+
2
−
6
View file @
5c8b9bf3
...
@@ -176,13 +176,12 @@ static void trim_control_surfaces()
...
@@ -176,13 +176,12 @@ static void trim_control_surfaces()
g
.
channel_roll
.
radio_trim
=
g
.
channel_roll
.
radio_max
+
g
.
channel_roll
.
radio_min
-
g
.
channel_roll
.
radio_in
;
g
.
channel_roll
.
radio_trim
=
g
.
channel_roll
.
radio_max
+
g
.
channel_roll
.
radio_min
-
g
.
channel_roll
.
radio_in
;
g
.
channel_pitch
.
radio_trim
=
g
.
channel_pitch
.
radio_max
+
g
.
channel_pitch
.
radio_min
-
g
.
channel_pitch
.
radio_in
;
g
.
channel_pitch
.
radio_trim
=
g
.
channel_pitch
.
radio_max
+
g
.
channel_pitch
.
radio_min
-
g
.
channel_pitch
.
radio_in
;
g
.
channel_rudder
.
radio_trim
=
g
.
channel_rudder
.
radio_max
+
g
.
channel_rudder
.
radio_min
-
g
.
channel_rudder
.
radio_in
;
g
.
channel_rudder
.
radio_trim
=
g
.
channel_rudder
.
radio_max
+
g
.
channel_rudder
.
radio_min
-
g
.
channel_rudder
.
radio_in
;
G_RC_AUX
(
k_aileron
)
->
radio_trim
=
g_rc_function
[
RC_Channel_aux
::
k_aileron
]
->
radio_in
;
// Second aileron channel
RC_Channel_aux
::
set_radio_trim
(
RC_Channel_aux
::
k_aileron
);
}
else
{
}
else
{
g
.
channel_roll
.
radio_trim
=
1500
;
// case of HIL test without receiver active
g
.
channel_roll
.
radio_trim
=
1500
;
// case of HIL test without receiver active
g
.
channel_pitch
.
radio_trim
=
1500
;
g
.
channel_pitch
.
radio_trim
=
1500
;
g
.
channel_rudder
.
radio_trim
=
1500
;
g
.
channel_rudder
.
radio_trim
=
1500
;
g
.
channel_throttle
.
radio_trim
=
1000
;
g
.
channel_throttle
.
radio_trim
=
1000
;
G_RC_AUX
(
k_aileron
)
->
radio_trim
=
1500
;
}
}
}
else
{
}
else
{
...
@@ -200,7 +199,6 @@ static void trim_control_surfaces()
...
@@ -200,7 +199,6 @@ static void trim_control_surfaces()
g
.
channel_pitch
.
save_eeprom
();
g
.
channel_pitch
.
save_eeprom
();
//g.channel_throttle.save_eeprom();
//g.channel_throttle.save_eeprom();
g
.
channel_rudder
.
save_eeprom
();
g
.
channel_rudder
.
save_eeprom
();
G_RC_AUX
(
k_aileron
)
->
save_eeprom
();
}
}
static
void
trim_radio
()
static
void
trim_radio
()
...
@@ -217,13 +215,12 @@ static void trim_radio()
...
@@ -217,13 +215,12 @@ static void trim_radio()
g
.
channel_pitch
.
radio_trim
=
g
.
channel_pitch
.
radio_in
;
g
.
channel_pitch
.
radio_trim
=
g
.
channel_pitch
.
radio_in
;
//g.channel_throttle.radio_trim = g.channel_throttle.radio_in;
//g.channel_throttle.radio_trim = g.channel_throttle.radio_in;
g
.
channel_rudder
.
radio_trim
=
g
.
channel_rudder
.
radio_in
;
g
.
channel_rudder
.
radio_trim
=
g
.
channel_rudder
.
radio_in
;
G_RC_AUX
(
k_aileron
)
->
radio_trim
=
g_rc_function
[
RC_Channel_aux
::
k_aileron
]
->
radio_in
;
// Second aileron channel
RC_Channel_aux
::
set_radio_trim
(
RC_Channel_aux
::
k_aileron
);
}
else
{
}
else
{
g
.
channel_roll
.
radio_trim
=
1500
;
// case of HIL test without receiver active
g
.
channel_roll
.
radio_trim
=
1500
;
// case of HIL test without receiver active
g
.
channel_pitch
.
radio_trim
=
1500
;
g
.
channel_pitch
.
radio_trim
=
1500
;
g
.
channel_rudder
.
radio_trim
=
1500
;
g
.
channel_rudder
.
radio_trim
=
1500
;
g
.
channel_throttle
.
radio_trim
=
1000
;
g
.
channel_throttle
.
radio_trim
=
1000
;
G_RC_AUX
(
k_aileron
)
->
radio_trim
=
1500
;
}
}
}
else
{
}
else
{
...
@@ -240,5 +237,4 @@ static void trim_radio()
...
@@ -240,5 +237,4 @@ static void trim_radio()
g
.
channel_pitch
.
save_eeprom
();
g
.
channel_pitch
.
save_eeprom
();
//g.channel_throttle.save_eeprom();
//g.channel_throttle.save_eeprom();
g
.
channel_rudder
.
save_eeprom
();
g
.
channel_rudder
.
save_eeprom
();
G_RC_AUX
(
k_aileron
)
->
save_eeprom
();
}
}
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