diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-21 17:57:37 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-21 17:57:37 +0100 |
commit | ed526173bb4f6a809e725aeb8214cf24042edd76 (patch) | |
tree | 470c2277011d493c373e5f706b114313b4e71361 /src | |
parent | b04fcad525c8f76419d468f43a4b159bc5200fbe (diff) | |
download | px4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.tar.gz px4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.tar.bz2 px4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.zip |
clean up publisher example
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/publisher/publisher_example.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/examples/publisher/publisher_example.cpp b/src/examples/publisher/publisher_example.cpp index e85e42b38..6b30c2fe3 100644 --- a/src/examples/publisher/publisher_example.cpp +++ b/src/examples/publisher/publisher_example.cpp @@ -46,9 +46,7 @@ using namespace px4; PublisherExample::PublisherExample() : _n(), _rc_channels_pub(_n.advertise<px4_rc_channels>()) - // _rc_channels_pub(PX4_ADVERTISE(_n, rc_channels)) { - } int PublisherExample::main() @@ -56,19 +54,10 @@ int PublisherExample::main() px4::Rate loop_rate(10); while (px4::ok()) { - // PX4_TOPIC_T(rc_channels) msg; - // msg.timestamp_last_valid = px4::get_time_micros(); - // PX4_INFO("%llu", msg.timestamp_last_valid); - - // _rc_channels_pub->publish(msg); - - //XXX - px4_rc_channels msg2; - msg2.data().timestamp_last_valid = px4::get_time_micros(); - PX4_INFO("%llu", msg2.data().timestamp_last_valid); - // msg2.pub->publish2(); - _rc_channels_pub->publish(msg2); - + px4_rc_channels msg; + msg.data().timestamp_last_valid = px4::get_time_micros(); + PX4_INFO("%llu", msg.data().timestamp_last_valid); + _rc_channels_pub->publish(msg); _n.spinOnce(); loop_rate.sleep(); |