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
1b7ca684
Commit
1b7ca684
authored
10 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Tracker: add read_radio
parent
f4d45c9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AntennaTracker/AntennaTracker.pde
+3
-2
3 additions, 2 deletions
AntennaTracker/AntennaTracker.pde
AntennaTracker/config.h
+11
-0
11 additions, 0 deletions
AntennaTracker/config.h
AntennaTracker/radio.pde
+11
-0
11 additions, 0 deletions
AntennaTracker/radio.pde
with
25 additions
and
2 deletions
AntennaTracker/AntennaTracker.pde
+
3
−
2
View file @
1b7ca684
...
...
@@ -182,8 +182,8 @@ SITL sitl;
/**
antenna control channels
*/
static
RC_Channel
channel_yaw
(
CH_
1
);
static
RC_Channel
channel_pitch
(
CH_
2
);
static
RC_Channel
channel_yaw
(
CH_
YAW
);
static
RC_Channel
channel_pitch
(
CH_
PITCH
);
////////////////////////////////////////////////////////////////////////////////
// GCS selection
...
...
@@ -255,6 +255,7 @@ static struct {
*/
static
const
AP_Scheduler
::
Task
scheduler_tasks
[]
PROGMEM
=
{
{
update_ahrs
,
1
,
1000
},
{
read_radio
,
1
,
200
},
{
update_tracking
,
1
,
1000
},
{
update_GPS
,
5
,
4000
},
{
update_compass
,
5
,
1500
},
...
...
This diff is collapsed.
Click to expand it.
AntennaTracker/config.h
+
11
−
0
View file @
1b7ca684
...
...
@@ -55,6 +55,17 @@
# define SERIAL2_BUFSIZE 256
#endif
//////////////////////////////////////////////////////////////////////////////
// RC Channel definitions
//
#ifndef CH_YAW
# define CH_YAW CH_1 // RC input/output for yaw on channel 1
#endif
#ifndef CH_PITCH
# define CH_PITCH CH_2 // RC input/output for pitch on channel 2
#endif
//////////////////////////////////////////////////////////////////////////////
// yaw and pitch axis angle range defaults
//
...
...
This diff is collapsed.
Click to expand it.
AntennaTracker/radio.pde
0 → 100644
+
11
−
0
View file @
1b7ca684
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
// Functions to read the RC radio input
static
void
read_radio
()
{
if
(
hal
.
rcin
->
new_input
())
{
channel_yaw
.
set_pwm
(
hal
.
rcin
->
read
(
CH_YAW
));
channel_pitch
.
set_pwm
(
hal
.
rcin
->
read
(
CH_PITCH
));
}
}
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