diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-28 14:00:02 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-28 14:00:02 +0100 |
commit | 1b416a8e1f2b54e183d61a0022bb48de47576a6c (patch) | |
tree | 57116a1dcb906d3a1226dd28200c1bcad57d7017 /src/platforms/px4_defines.h | |
parent | b0cfc2d1226c2b62a6bf3aac1809458b04902728 (diff) | |
download | px4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.tar.gz px4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.tar.bz2 px4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.zip |
use interval setting correctly, improve px4::spin
Diffstat (limited to 'src/platforms/px4_defines.h')
-rw-r--r-- | src/platforms/px4_defines.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h index 79f305140..7efe13bae 100644 --- a/src/platforms/px4_defines.h +++ b/src/platforms/px4_defines.h @@ -50,7 +50,7 @@ #define PX4_INFO ROS_INFO #define PX4_TOPIC(_name) #_name #define PX4_TOPIC_T(_name) _name -#define PX4_SUBSCRIBE(_nodehandle, _name, _cbf) _nodehandle.subscribe(PX4_TOPIC(_name), _cbf); +#define PX4_SUBSCRIBE(_nodehandle, _name, _cbf, _interval) _nodehandle.subscribe(PX4_TOPIC(_name), _cbf); #else /* @@ -65,6 +65,6 @@ #define PX4_INFO warnx #define PX4_TOPIC(_name) ORB_ID(_name) #define PX4_TOPIC_T(_name) _name##_s -#define PX4_SUBSCRIBE(_nodehandle, _name, _cbf) _nodehandle.subscribe<PX4_TOPIC_T(_name)>(PX4_TOPIC(_name), [](const PX4_TOPIC_T(_name)& msg){ return _cbf(msg);}) +#define PX4_SUBSCRIBE(_nodehandle, _name, _cbf, _interval) _nodehandle.subscribe<PX4_TOPIC_T(_name)>(PX4_TOPIC(_name), [](const PX4_TOPIC_T(_name)& msg){ return _cbf(msg);}, _interval) #endif |