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
3dbb4fb3
Commit
3dbb4fb3
authored
9 years ago
by
Mark Charlebois
Committed by
Julian Oes
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Backed out change to uORBDevices_posix.cpp
Signed-off-by:
Mark Charlebois
<
charlebm@gmail.com
>
parent
d56459bd
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/modules/uORB/uORBDevices_posix.cpp
+19
-5
19 additions, 5 deletions
src/modules/uORB/uORBDevices_posix.cpp
with
19 additions
and
5 deletions
src/modules/uORB/uORBDevices_posix.cpp
+
19
−
5
View file @
3dbb4fb3
...
...
@@ -287,7 +287,6 @@ uORB::DeviceNode::ioctl(device::file_t *filp, int cmd, unsigned long arg)
case
ORBIOCSETINTERVAL
:
sd
->
update_interval
=
arg
;
sd
->
last_update
=
hrt_absolute_time
();
return
PX4_OK
;
case
ORBIOCGADVERTISER
:
...
...
@@ -406,6 +405,7 @@ uORB::DeviceNode::appears_updated(SubscriberData *sd)
* don't match then we might have a visible update.
*/
while
(
sd
->
generation
!=
_generation
)
{
/*
* Handle non-rate-limited subscribers.
*/
...
...
@@ -426,17 +426,31 @@ uORB::DeviceNode::appears_updated(SubscriberData *sd)
break
;
}
// If we have not yet reached the deadline, then assume that we can ignore any
// newly received data.
if
(
sd
->
last_update
+
sd
->
update_interval
>
hrt_absolute_time
())
{
/*
* If the interval timer is still running, the topic should not
* appear updated, even though at this point we know that it has.
* We have previously been through here, so the subscriber
* must have collected the update we reported, otherwise
* update_reported would still be true.
*/
if
(
!
hrt_called
(
&
sd
->
update_call
))
{
break
;
}
/*
* Make sure that we don't consider the topic to be updated again
* until the interval has passed once more by restarting the interval
* timer and thereby re-scheduling a poll notification at that time.
*/
hrt_call_after
(
&
sd
->
update_call
,
sd
->
update_interval
,
&
uORB
::
DeviceNode
::
update_deferred_trampoline
,
(
void
*
)
this
);
/*
* Remember that we have told the subscriber that there is data.
*/
sd
->
update_reported
=
true
;
sd
->
last_update
=
hrt_absolute_time
();
ret
=
true
;
break
;
...
...
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