Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
44a507fc
Commit
44a507fc
authored
7 years ago
by
Beat Küng
Committed by
Lorenz Meier
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
camera_interface: initialize _p_pin & handle error
parent
f42a6265
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
src/drivers/camera_trigger/interfaces/src/camera_interface.cpp
+8
-1
8 additions, 1 deletion
...rivers/camera_trigger/interfaces/src/camera_interface.cpp
with
8 additions
and
1 deletion
src/drivers/camera_trigger/interfaces/src/camera_interface.cpp
+
8
−
1
View file @
44a507fc
#include
"camera_interface.h"
#include
<px4_log.h>
/**
* @file camera_interface.cpp
...
...
@@ -6,6 +7,7 @@
*/
CameraInterface
::
CameraInterface
()
:
_p_pin
(
PARAM_INVALID
),
_pins
{}
{
}
...
...
@@ -20,6 +22,11 @@ void CameraInterface::get_pins()
// Get parameter handle
_p_pin
=
param_find
(
"TRIG_PINS"
);
if
(
_p_pin
==
PARAM_INVALID
)
{
PX4_ERR
(
"param TRIG_PINS not found"
);
return
;
}
int
pin_list
;
param_get
(
_p_pin
,
&
pin_list
);
...
...
@@ -44,4 +51,4 @@ void CameraInterface::get_pins()
i
++
;
}
}
\ No newline at end of file
}
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