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
5060b8bd
Commit
5060b8bd
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
AP_Camera: updated for new RC_Channel_aux API
parent
540f7894
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
libraries/AP_Camera/AP_Camera.cpp
+4
-7
4 additions, 7 deletions
libraries/AP_Camera/AP_Camera.cpp
with
4 additions
and
7 deletions
libraries/AP_Camera/AP_Camera.cpp
+
4
−
7
View file @
5060b8bd
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include
<AP_Relay.h>
#include
<AP_Relay.h>
#include
<../RC_Channel/RC_Channel_aux.h>
#include
<../RC_Channel/RC_Channel_aux.h>
extern
RC_Channel_aux
*
g_rc_function
[
RC_Channel_aux
::
k_nr_aux_servo_functions
];
// the aux. servo ch. assigned to each function
extern
int32_t
wp_distance
;
extern
int32_t
wp_distance
;
extern
AP_Relay
relay
;
extern
AP_Relay
relay
;
...
@@ -26,11 +25,9 @@ const AP_Param::GroupInfo AP_Camera::var_info[] PROGMEM = {
...
@@ -26,11 +25,9 @@ const AP_Param::GroupInfo AP_Camera::var_info[] PROGMEM = {
void
void
AP_Camera
::
servo_pic
()
AP_Camera
::
servo_pic
()
{
{
if
(
g_rc_function
[
RC_Channel_aux
::
k_cam_trigger
])
RC_Channel_aux
::
set_radio_to_max
(
RC_Channel_aux
::
k_cam_trigger
);
{
// leave a message that it should be active for two event loop cycles
g_rc_function
[
RC_Channel_aux
::
k_cam_trigger
]
->
radio_out
=
g_rc_function
[
RC_Channel_aux
::
k_cam_trigger
]
->
radio_max
;
keep_cam_trigg_active_cycles
=
2
;
keep_cam_trigg_active_cycles
=
2
;
// leave a message that it should be active for two event loop cycles
}
}
}
/// basic relay activation
/// basic relay activation
...
@@ -115,7 +112,7 @@ AP_Camera::trigger_pic_cleanup()
...
@@ -115,7 +112,7 @@ AP_Camera::trigger_pic_cleanup()
case
0
:
case
0
:
case
2
:
case
2
:
case
3
:
case
3
:
G_RC_AUX
(
k_cam_trigger
)
->
radio_out
=
g_rc_function
[
RC_Channel_aux
::
k_cam_trigger
]
->
radio_min
;
RC_Channel_aux
::
set_radio_to_min
(
RC_Channel_aux
::
k_cam_trigger
)
;
break
;
break
;
case
1
:
case
1
:
relay
.
off
();
relay
.
off
();
...
...
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