aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2015-01-21 17:57:37 +0100
committerThomas Gubler <thomasgubler@gmail.com>2015-01-21 17:57:37 +0100
commited526173bb4f6a809e725aeb8214cf24042edd76 (patch)
tree470c2277011d493c373e5f706b114313b4e71361 /src/examples
parentb04fcad525c8f76419d468f43a4b159bc5200fbe (diff)
downloadpx4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.tar.gz
px4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.tar.bz2
px4-firmware-ed526173bb4f6a809e725aeb8214cf24042edd76.zip
clean up publisher example
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/publisher/publisher_example.cpp19
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();