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
f5901375
Commit
f5901375
authored
6 years ago
by
bresch
Committed by
Lorenz Meier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix HIL
Revert "pwm_out_sim lazily publish actuator_outputs" This reverts commit
bcad940a
.
parent
4e2bf27d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/drivers/pwm_out_sim/PWMSim.cpp
+4
-2
4 additions, 2 deletions
src/drivers/pwm_out_sim/PWMSim.cpp
src/drivers/pwm_out_sim/PWMSim.hpp
+1
-1
1 addition, 1 deletion
src/drivers/pwm_out_sim/PWMSim.hpp
with
5 additions
and
3 deletions
src/drivers/pwm_out_sim/PWMSim.cpp
+
4
−
2
View file @
f5901375
...
...
@@ -158,6 +158,9 @@ PWMSim::run()
_armed_sub
=
orb_subscribe
(
ORB_ID
(
actuator_armed
));
/* advertise the mixed control outputs, insist on the first group output */
_outputs_pub
=
orb_advertise
(
ORB_ID
(
actuator_outputs
),
&
_actuator_outputs
);
update_params
();
int
params_sub
=
orb_subscribe
(
ORB_ID
(
parameter_update
));
...
...
@@ -284,8 +287,7 @@ PWMSim::run()
/* and publish for anyone that cares to see */
_actuator_outputs
.
timestamp
=
hrt_absolute_time
();
int
instance
;
orb_publish_auto
(
ORB_ID
(
actuator_outputs
),
&
_outputs_pub
,
&
_actuator_outputs
,
&
instance
,
ORB_PRIO_DEFAULT
);
orb_publish
(
ORB_ID
(
actuator_outputs
),
_outputs_pub
,
&
_actuator_outputs
);
// use first valid timestamp_sample for latency tracking
for
(
int
i
=
0
;
i
<
actuator_controls_s
::
NUM_ACTUATOR_CONTROL_GROUPS
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/drivers/pwm_out_sim/PWMSim.hpp
+
1
−
1
View file @
f5901375
...
...
@@ -110,7 +110,7 @@ private:
int
_armed_sub
{
-
1
};
actuator_outputs_s
_actuator_outputs
{};
actuator_outputs_s
_actuator_outputs
=
{};
orb_advert_t
_outputs_pub
{
nullptr
};
unsigned
_num_outputs
{
0
};
...
...
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