本文整理汇总了C++中MavlinkOrbSubscription类的典型用法代码示例。如果您正苦于以下问题:C++ MavlinkOrbSubscription类的具体用法?C++ MavlinkOrbSubscription怎么用?C++ MavlinkOrbSubscription使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MavlinkOrbSubscription类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send
void send(const hrt_abstime t)
{
if (gps_sub->update(t)) {
mavlink_msg_gps_raw_int_send(_channel,
gps->timestamp_position,
gps->fix_type,
gps->lat,
gps->lon,
gps->alt,
cm_uint16_from_m_float(gps->eph_m),
cm_uint16_from_m_float(gps->epv_m),
gps->vel_m_s * 100.0f,
_wrap_2pi(gps->cog_rad) * M_RAD_TO_DEG_F * 1e2f,
gps->satellites_visible);
}
}
示例2: send
void send(const hrt_abstime t)
{
struct actuator_outputs_s act;
if (act_sub->update(&act_time, &act)) {
mavlink_msg_servo_output_raw_send(_channel,
act.timestamp / 1000,
N,
act.output[0],
act.output[1],
act.output[2],
act.output[3],
act.output[4],
act.output[5],
act.output[6],
act.output[7]);
}
}
示例3: send
void send(const hrt_abstime t)
{
status_sub->update(t);
mavlink_msg_sys_status_send(_channel,
status->onboard_control_sensors_present,
status->onboard_control_sensors_enabled,
status->onboard_control_sensors_health,
status->load * 1000.0f,
status->battery_voltage * 1000.0f,
status->battery_current * 100.0f,
status->battery_remaining * 100.0f,
status->drop_rate_comm,
status->errors_comm,
status->errors_count1,
status->errors_count2,
status->errors_count3,
status->errors_count4);
}
示例4: subscribe
void subscribe(Mavlink *mavlink)
{
pos_sp_sub = mavlink->add_orb_subscription(ORB_ID(vehicle_local_position_setpoint));
pos_sp = (struct vehicle_local_position_setpoint_s *)pos_sp_sub->get_data();
}