mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 20:43:33 +08:00
fix print for px4
This commit is contained in:
@@ -80,7 +80,7 @@ PX4_MAIN_FUNCTION(publisher)
|
|||||||
PX4_TOPIC_T(rc_channels) msg;
|
PX4_TOPIC_T(rc_channels) msg;
|
||||||
|
|
||||||
msg.timestamp_last_valid = px4::get_time_micros();
|
msg.timestamp_last_valid = px4::get_time_micros();
|
||||||
PX4_INFO("%lu", msg.timestamp_last_valid);
|
PX4_INFO("%llu", msg.timestamp_last_valid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The publish() function is how you send messages. The parameter
|
* The publish() function is how you send messages. The parameter
|
||||||
@@ -96,6 +96,5 @@ PX4_MAIN_FUNCTION(publisher)
|
|||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ using namespace px4;
|
|||||||
*/
|
*/
|
||||||
void rc_channels_callback(const PX4_TOPIC_T(rc_channels) &msg)
|
void rc_channels_callback(const PX4_TOPIC_T(rc_channels) &msg)
|
||||||
{
|
{
|
||||||
PX4_INFO("I heard: [%lu]", msg.timestamp_last_valid);
|
PX4_INFO("I heard: [%llu]", msg.timestamp_last_valid);
|
||||||
}
|
}
|
||||||
// void rc_channels_callback(int i)
|
// void rc_channels_callback(int i)
|
||||||
// {
|
// {
|
||||||
@@ -99,6 +99,7 @@ PX4_MAIN_FUNCTION(subscriber)
|
|||||||
* will exit when Ctrl-C is pressed, or the node is shutdown by the master.
|
* will exit when Ctrl-C is pressed, or the node is shutdown by the master.
|
||||||
*/
|
*/
|
||||||
n.spin();
|
n.spin();
|
||||||
|
PX4_INFO("finished, returning");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user