42 #include <px4_platform_common/log.h> 45 #include <px4_platform_common/defines.h> 70 while (!
appState.exitRequested() && i < 100) {
72 PX4_DEBUG(
"[%d] Doing work...", i);
75 PX4_ERR(
"[%d]Error publishing the esc status message for iter", i);
79 if (sub_vc.updated()) {
80 PX4_DEBUG(
"[%d]Vechicle Status is updated... reading new value", i);
82 if (!sub_vc.copy(&
m_vc)) {
83 PX4_ERR(
"[%d]Error calling orb copy for vechivle status... ", i);
87 if (!vcmd_pub.publish(
m_vc)) {
88 PX4_ERR(
"[%d]Error publishing the vechile command message", i);
93 PX4_ERR(
"[%d]Error checking the updated status for vechile command... ", i);
94 PX4_DEBUG(
"[%d] VC topic is not updated", i);
112 PX4_INFO(
"[%d] Doing work...", i);
114 if (sub_esc_status.updated()) {
115 PX4_INFO(
"[%d]ESC status is updated... reading new value", i);
118 PX4_ERR(
"[%d]Error calling orb copy for esc status... ", i);
122 if (!vcmd_pub.publish(
m_vc)) {
123 PX4_ERR(
"[%d]Error publishing the vechile command message", i);
128 PX4_INFO(
"[%d] esc status topic is not updated", i);
struct vehicle_command_s m_vc
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
struct esc_status_s m_esc_status
static px4::AppState appState