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
ad05a6a7
Commit
ad05a6a7
authored
7 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Patches
Plain Diff
PCA9685 driver: Fix define
parent
c9a28fc0
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/pca9685/pca9685.cpp
+3
-3
3 additions, 3 deletions
src/drivers/pca9685/pca9685.cpp
with
3 additions
and
3 deletions
src/drivers/pca9685/pca9685.cpp
+
3
−
3
View file @
ad05a6a7
/****************************************************************************
*
* Copyright (c) 2012-201
4
PX4 Development Team. All rights reserved.
* Copyright (c) 2012-201
7
PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -136,7 +136,7 @@ private:
int
_actuator_controls_sub
;
struct
actuator_controls_s
_actuator_controls
;
uint16_t
_current_values
[
NUM_ACTUATOR_CONTROLS
];
/**< stores the current pwm output
uint16_t
_current_values
[
actuator_controls_s
::
NUM_ACTUATOR_CONTROLS
];
/**< stores the current pwm output
values as sent to the setPin() */
bool
_mode_on_initialized
;
/** Set to true after the first call of i2cpwm in mode IOX_MODE_ON */
...
...
@@ -326,7 +326,7 @@ PCA9685::i2cpwm()
if
(
updated
)
{
orb_copy
(
ORB_ID
(
actuator_controls_2
),
_actuator_controls_sub
,
&
_actuator_controls
);
for
(
int
i
=
0
;
i
<
NUM_ACTUATOR_CONTROLS
;
i
++
)
{
for
(
int
i
=
0
;
i
<
actuator_controls_s
::
NUM_ACTUATOR_CONTROLS
;
i
++
)
{
/* Scale the controls to PWM, first multiply by pi to get rad,
* the control[i] values are on the range -1 ... 1 */
uint16_t
new_value
=
PCA9685_PWMCENTER
+
...
...
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