diff options
Diffstat (limited to 'src/platforms/px4_subscriber.h')
-rw-r--r-- | src/platforms/px4_subscriber.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platforms/px4_subscriber.h b/src/platforms/px4_subscriber.h index efec8f2a3..6e0ef8aed 100644 --- a/src/platforms/px4_subscriber.h +++ b/src/platforms/px4_subscriber.h @@ -89,6 +89,11 @@ public: ~SubscriberPX4() {}; void update() { + if (!uORB::Subscription<M>::updated()) { + /* Topic not updated, do not call callback */ + return; + } + /* get latest data */ uORB::Subscription<M>::update(); |