PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <mavlink_receiver.h>
Public Member Functions | |
MavlinkReceiver (Mavlink *parent) | |
~MavlinkReceiver ()=default | |
Static Public Member Functions | |
static void | receive_start (pthread_t *thread, Mavlink *parent) |
Start the receiver thread. More... | |
static void * | start_helper (void *context) |
Private Member Functions | |
void | acknowledge (uint8_t sysid, uint8_t compid, uint16_t command, uint8_t result) |
template<class T > | |
void | handle_message_command_both (mavlink_message_t *msg, const T &cmd_mavlink, const vehicle_command_s &vehicle_command) |
Common method to handle both mavlink command types. More... | |
void | handle_message (mavlink_message_t *msg) |
void | handle_message_adsb_vehicle (mavlink_message_t *msg) |
void | handle_message_att_pos_mocap (mavlink_message_t *msg) |
void | handle_message_battery_status (mavlink_message_t *msg) |
void | handle_message_cellular_status (mavlink_message_t *msg) |
void | handle_message_collision (mavlink_message_t *msg) |
void | handle_message_command_ack (mavlink_message_t *msg) |
void | handle_message_command_int (mavlink_message_t *msg) |
void | handle_message_command_long (mavlink_message_t *msg) |
void | handle_message_debug (mavlink_message_t *msg) |
void | handle_message_debug_float_array (mavlink_message_t *msg) |
void | handle_message_debug_vect (mavlink_message_t *msg) |
void | handle_message_distance_sensor (mavlink_message_t *msg) |
void | handle_message_follow_target (mavlink_message_t *msg) |
void | handle_message_gps_global_origin (mavlink_message_t *msg) |
void | handle_message_gps_rtcm_data (mavlink_message_t *msg) |
void | handle_message_heartbeat (mavlink_message_t *msg) |
void | handle_message_hil_gps (mavlink_message_t *msg) |
void | handle_message_hil_optical_flow (mavlink_message_t *msg) |
void | handle_message_hil_sensor (mavlink_message_t *msg) |
void | handle_message_hil_state_quaternion (mavlink_message_t *msg) |
void | handle_message_landing_target (mavlink_message_t *msg) |
void | handle_message_logging_ack (mavlink_message_t *msg) |
void | handle_message_manual_control (mavlink_message_t *msg) |
void | handle_message_named_value_float (mavlink_message_t *msg) |
void | handle_message_obstacle_distance (mavlink_message_t *msg) |
void | handle_message_odometry (mavlink_message_t *msg) |
void | handle_message_optical_flow_rad (mavlink_message_t *msg) |
void | handle_message_ping (mavlink_message_t *msg) |
void | handle_message_play_tune (mavlink_message_t *msg) |
void | handle_message_radio_status (mavlink_message_t *msg) |
void | handle_message_rc_channels_override (mavlink_message_t *msg) |
void | handle_message_serial_control (mavlink_message_t *msg) |
void | handle_message_set_actuator_control_target (mavlink_message_t *msg) |
void | handle_message_set_attitude_target (mavlink_message_t *msg) |
void | handle_message_set_mode (mavlink_message_t *msg) |
void | handle_message_set_position_target_local_ned (mavlink_message_t *msg) |
void | handle_message_set_position_target_global_int (mavlink_message_t *msg) |
void | handle_message_statustext (mavlink_message_t *msg) |
void | handle_message_trajectory_representation_waypoints (mavlink_message_t *msg) |
void | handle_message_utm_global_position (mavlink_message_t *msg) |
void | handle_message_vision_position_estimate (mavlink_message_t *msg) |
void | handle_message_onboard_computer_status (mavlink_message_t *msg) |
void | Run () |
Receive data from UART/UDP. More... | |
int | set_message_interval (int msgId, float interval, int data_rate=-1) |
Set the interval at which the given message stream is published. More... | |
void | get_message_interval (int msgId) |
switch_pos_t | decode_switch_pos (uint16_t buttons, unsigned sw) |
Decode a switch position from a bitfield. More... | |
int | decode_switch_pos_n (uint16_t buttons, unsigned sw) |
Decode a switch position from a bitfield and state. More... | |
bool | evaluate_target_ok (int command, int target_system, int target_component) |
void | send_flight_information () |
void | send_storage_information (int storage_id) |
void | fill_thrust (float *thrust_body_array, uint8_t vehicle_type, float thrust) |
void | update_params () |
Updates the battery, optical flow, and flight ID subscribed parameters. More... | |
DEFINE_PARAMETERS ((ParamFloat< px4::params::BAT_CRIT_THR >) _param_bat_crit_thr,(ParamFloat< px4::params::BAT_EMERGEN_THR >) _param_bat_emergen_thr,(ParamFloat< px4::params::BAT_LOW_THR >) _param_bat_low_thr,(ParamInt< px4::params::COM_FLIGHT_UUID >) _param_com_flight_uuid,(ParamFloat< px4::params::SENS_FLOW_MAXHGT >) _param_sens_flow_maxhgt,(ParamFloat< px4::params::SENS_FLOW_MAXR >) _param_sens_flow_maxr,(ParamFloat< px4::params::SENS_FLOW_MINHGT >) _param_sens_flow_minhgt,(ParamInt< px4::params::SENS_FLOW_ROT >) _param_sens_flow_rot) | |
MavlinkReceiver (const MavlinkReceiver &)=delete | |
MavlinkReceiver | operator= (const MavlinkReceiver &)=delete |
Static Private Attributes | |
static constexpr unsigned int | MOM_SWITCH_COUNT {8} |
Definition at line 106 of file mavlink_receiver.h.
MavlinkReceiver::MavlinkReceiver | ( | Mavlink * | parent | ) |
Definition at line 80 of file mavlink_receiver.cpp.
|
default |
|
privatedelete |
|
private |
Definition at line 92 of file mavlink_receiver.cpp.
References _cmd_ack_pub, command, hrt_absolute_time(), uORB::PublicationQueued< T >::publish(), and vehicle_command_ack_s::timestamp.
Referenced by handle_message_command_both().
|
private |
Decode a switch position from a bitfield.
Definition at line 1777 of file mavlink_receiver.cpp.
|
private |
Decode a switch position from a bitfield and state.
Definition at line 1784 of file mavlink_receiver.cpp.
References _mom_switch_pos, _mom_switch_state, and MOM_SWITCH_COUNT.
Referenced by handle_message_manual_control().
|
private |
|
private |
Definition at line 313 of file mavlink_receiver.cpp.
References mavlink_system.
Referenced by handle_message_command_both().
|
private |
Definition at line 1311 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_system_type(), and VEHICLE_TYPE_FIXED_WING.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 2014 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_channel(), and Mavlink::get_streams().
Referenced by handle_message_command_both().
|
private |
Definition at line 106 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_hil_enabled(), Mavlink::get_use_hil_gps(), handle_message_adsb_vehicle(), handle_message_att_pos_mocap(), handle_message_battery_status(), handle_message_cellular_status(), handle_message_collision(), handle_message_command_ack(), handle_message_command_int(), handle_message_command_long(), handle_message_debug(), handle_message_debug_float_array(), handle_message_debug_vect(), handle_message_distance_sensor(), handle_message_follow_target(), handle_message_gps_global_origin(), handle_message_gps_rtcm_data(), handle_message_heartbeat(), handle_message_hil_gps(), handle_message_hil_optical_flow(), handle_message_hil_sensor(), handle_message_hil_state_quaternion(), handle_message_landing_target(), handle_message_logging_ack(), handle_message_manual_control(), handle_message_named_value_float(), handle_message_obstacle_distance(), handle_message_odometry(), handle_message_onboard_computer_status(), handle_message_optical_flow_rad(), handle_message_ping(), handle_message_play_tune(), handle_message_radio_status(), handle_message_rc_channels_override(), handle_message_serial_control(), handle_message_set_actuator_control_target(), handle_message_set_attitude_target(), handle_message_set_mode(), handle_message_set_position_target_global_int(), handle_message_set_position_target_local_ned(), handle_message_statustext(), handle_message_trajectory_representation_waypoints(), handle_message_utm_global_position(), handle_message_vision_position_estimate(), mavlink_system, and Mavlink::set_has_received_messages().
Referenced by Run().
|
private |
Definition at line 2222 of file mavlink_receiver.cpp.
References _transponder_report_pub, hrt_absolute_time(), M_PI_F, uORB::PublicationQueued< T >::publish(), and transponder_report_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 710 of file mavlink_receiver.cpp.
References _mavlink_timesync, _mocap_odometry_pub, uORB::Publication< T >::publish(), MavlinkTimesync::sync_stamp(), and vehicle_odometry_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1598 of file mavlink_receiver.cpp.
References _battery_pub, hrt_absolute_time(), mavlink_system, and uORB::Publication< T >::publish().
Referenced by handle_message().
|
private |
Definition at line 2202 of file mavlink_receiver.cpp.
References _cellular_status_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), status, and cellular_status_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2329 of file mavlink_receiver.cpp.
References _collision_report_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and collision_report_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 533 of file mavlink_receiver.cpp.
References _cmd_ack_pub, _mavlink, Mavlink::get_channel(), MavlinkCommandSender::handle_mavlink_command_ack(), hrt_absolute_time(), MavlinkCommandSender::instance(), uORB::PublicationQueued< T >::publish(), and vehicle_command_ack_s::timestamp.
Referenced by handle_message().
|
private |
Common method to handle both mavlink command types.
T is one of mavlink_command_int_t or mavlink_command_long_t.
Definition at line 452 of file mavlink_receiver.cpp.
References _cmd_pub, _mavlink, acknowledge(), Mavlink::configure_stream_threadsafe(), evaluate_target_ok(), f(), Mavlink::get_data_rate(), get_message_interval(), mavlink_system, uORB::PublicationQueued< T >::publish(), Mavlink::request_stop_ulog_streaming(), Mavlink::send_autopilot_capabilites(), send_flight_information(), Mavlink::send_protocol_version(), Mavlink::send_statustext_critical(), send_storage_information(), set_message_interval(), and Mavlink::try_start_ulog_streaming().
Referenced by handle_message_command_int(), and handle_message_command_long().
|
private |
Definition at line 423 of file mavlink_receiver.cpp.
References handle_message_command_both(), hrt_absolute_time(), and vehicle_command_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 393 of file mavlink_receiver.cpp.
References handle_message_command_both(), hrt_absolute_time(), and vehicle_command_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2522 of file mavlink_receiver.cpp.
References _debug_value_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and debug_value_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2555 of file mavlink_receiver.cpp.
References _debug_array_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and debug_array_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2537 of file mavlink_receiver.cpp.
References _debug_vect_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and debug_vect_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 683 of file mavlink_receiver.cpp.
References _distance_sensor_pub, f(), hrt_absolute_time(), uORB::PublicationMulti< T >::publish(), and distance_sensor_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2167 of file mavlink_receiver.cpp.
References _follow_target_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and follow_target_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1173 of file mavlink_receiver.cpp.
References _global_ref_timestamp, f(), globallocalconverter_init(), globallocalconverter_initialized(), and hrt_absolute_time().
Referenced by handle_message().
|
private |
Definition at line 2349 of file mavlink_receiver.cpp.
References _gps_inject_data_pub, gps_inject_data_s::len, math::min(), and uORB::PublicationQueued< T >::publish().
Referenced by handle_message().
|
private |
Definition at line 1946 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_channel(), Mavlink::get_telemetry_status(), telemetry_status_s::heartbeat_time, hrt_absolute_time(), mavlink_system, ORB_MULTI_MAX_INSTANCES, telemetry_status_s::remote_component_id, telemetry_status_s::remote_system_id, telemetry_status_s::remote_system_status, and telemetry_status_s::remote_type.
Referenced by handle_message().
|
private |
Definition at line 2129 of file mavlink_receiver.cpp.
References _gps_pub, vehicle_gps_position_s::alt, vehicle_gps_position_s::cog_rad, vehicle_gps_position_s::eph, vehicle_gps_position_s::epv, f(), vehicle_gps_position_s::fix_type, gps, vehicle_gps_position_s::heading, vehicle_gps_position_s::heading_offset, hrt_absolute_time(), vehicle_gps_position_s::lat, vehicle_gps_position_s::lon, uORB::Publication< T >::publish(), math::radians(), vehicle_gps_position_s::s_variance_m_s, vehicle_gps_position_s::satellites_used, vehicle_gps_position_s::time_utc_usec, vehicle_gps_position_s::timestamp, vehicle_gps_position_s::timestamp_time_relative, vehicle_gps_position_s::vel_d_m_s, vehicle_gps_position_s::vel_e_m_s, vehicle_gps_position_s::vel_m_s, vehicle_gps_position_s::vel_n_m_s, vehicle_gps_position_s::vel_ned_valid, and matrix::wrap_2pi().
Referenced by handle_message().
|
private |
Definition at line 615 of file mavlink_receiver.cpp.
References _flow_distance_sensor_pub, _flow_pub, f(), hrt_absolute_time(), uORB::Publication< T >::publish(), uORB::PublicationMulti< T >::publish(), and distance_sensor_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2030 of file mavlink_receiver.cpp.
References _accel_pub, _airspeed_pub, _baro_pub, _battery_pub, _gyro_pub, _mag_pub, calc_EAS_from_IAS(), calc_IAS(), calc_TAS_from_EAS(), CONSTANTS_ONE_G, hrt_absolute_time(), uORB::Publication< T >::publish(), uORB::PublicationMulti< T >::publish(), sensor_accel_s::timestamp, sensor_mag_s::timestamp, sensor_baro_s::timestamp, sensor_gyro_s::timestamp, and battery_status_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2366 of file mavlink_receiver.cpp.
References _accel_pub, _airspeed_pub, _attitude_pub, _battery_pub, _global_pos_pub, _gyro_pub, _hil_local_alt0, _hil_local_proj_inited, _hil_local_proj_ref, _local_pos_pub, CONSTANTS_ONE_G, matrix::Matrix< Type, M, N >::copyTo(), f(), hrt_absolute_time(), vehicle_gps_position_s::lat, map_projection_reference_s::lat_rad, vehicle_gps_position_s::lon, map_projection_reference_s::lon_rad, map_projection_init(), map_projection_project(), uORB::Publication< T >::publish(), uORB::PublicationMulti< T >::publish(), math::radians(), vehicle_global_position_s::timestamp, sensor_accel_s::timestamp, vehicle_attitude_s::timestamp, vehicle_local_position_s::timestamp, vehicle_gps_position_s::timestamp, sensor_gyro_s::timestamp, airspeed_s::timestamp, battery_status_s::timestamp, and map_projection_reference_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2183 of file mavlink_receiver.cpp.
References _landing_target_pose_pub, _mavlink_timesync, uORB::Publication< T >::publish(), MavlinkTimesync::sync_stamp(), and landing_target_pose_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1672 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_ulog_streaming(), and MavlinkULog::handle_ack().
Referenced by handle_message().
|
private |
Definition at line 1884 of file mavlink_receiver.cpp.
References _manual_pub, _mavlink, _mom_switch_state, _rc_pub, math::constrain(), decode_switch_pos_n(), Mavlink::get_instance_id(), Mavlink::get_manual_input_mode_generation(), Mavlink::get_system_id(), hrt_absolute_time(), uORB::PublicationMulti< T >::publish(), RC_INPUT_RSSI_MAX, input_rc_s::timestamp, and manual_control_setpoint_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2506 of file mavlink_receiver.cpp.
References _debug_key_value_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and debug_key_value_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1709 of file mavlink_receiver.cpp.
References _obstacle_distance_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and obstacle_distance_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1228 of file mavlink_receiver.cpp.
References _mavlink_timesync, _mocap_odometry_pub, _visual_odometry_pub, matrix::Matrix< Type, M, N >::copyTo(), matrix::Vector< Type, M >::normalize(), uORB::Publication< T >::publish(), MavlinkTimesync::sync_stamp(), and vehicle_odometry_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2575 of file mavlink_receiver.cpp.
References _onboard_computer_status_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and onboard_computer_status_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 562 of file mavlink_receiver.cpp.
References _flow_distance_sensor_pub, _flow_pub, f(), hrt_absolute_time(), uORB::Publication< T >::publish(), uORB::PublicationMulti< T >::publish(), rotate_3f(), and distance_sensor_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1533 of file mavlink_receiver.cpp.
References _mavlink, _ping_pub, Mavlink::ping_statistics_s::dropped_packets, f(), Mavlink::get_channel(), Mavlink::get_ping_statistics(), hrt_absolute_time(), hrt_abstime, Mavlink::ping_statistics_s::last_ping_seq, Mavlink::ping_statistics_s::last_ping_time, Mavlink::ping_statistics_s::last_rtt, mavlink_system, Mavlink::ping_statistics_s::max_rtt, Mavlink::ping_statistics_s::mean_rtt, Mavlink::ping_statistics_s::min_rtt, ORB_MULTI_MAX_INSTANCES, uORB::PublicationMulti< T >::publish(), and ping_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1685 of file mavlink_receiver.cpp.
References fd, mavlink_system, px4_close(), px4_open(), px4_write(), and TONE_ALARM0_DEVICE_PATH.
Referenced by handle_message().
|
private |
Definition at line 1508 of file mavlink_receiver.cpp.
References _mavlink, _radio_status_pub, Mavlink::get_channel(), hrt_absolute_time(), ORB_MULTI_MAX_INSTANCES, uORB::PublicationMulti< T >::publish(), status, vehicle_status_s::timestamp, and Mavlink::update_radio_status().
Referenced by handle_message().
|
private |
Definition at line 1819 of file mavlink_receiver.cpp.
References _mavlink, _rc_pub, Mavlink::get_system_id(), hrt_absolute_time(), uORB::PublicationMulti< T >::publish(), RC_INPUT_RSSI_MAX, and input_rc_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1645 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::close_shell(), Mavlink::get_shell(), and MavlinkShell::write().
Referenced by handle_message().
|
private |
Definition at line 1088 of file mavlink_receiver.cpp.
References _actuator_controls_pubs, _control_mode_sub, _offboard_control_mode_pub, actuator_controls, uORB::Subscription::copy(), hrt_absolute_time(), offboard_control_mode_s::ignore_thrust, mavlink_system, and uORB::Publication< T >::publish().
Referenced by handle_message().
|
private |
Definition at line 1360 of file mavlink_receiver.cpp.
References _att_sp_pub, _control_mode_sub, _fw_virtual_att_sp_pub, _mavlink, _mc_virtual_att_sp_pub, _offboard_control_mode_pub, _rates_sp_pub, _vehicle_status_sub, uORB::Subscription::copy(), matrix::Matrix< Type, M, N >::copyTo(), fill_thrust(), Mavlink::get_forward_externalsp(), hrt_absolute_time(), offboard_control_mode_s::ignore_thrust, mavlink_system, vehicle_attitude_setpoint_s::pitch_body, uORB::Publication< T >::publish(), vehicle_attitude_setpoint_s::q_d, vehicle_attitude_setpoint_s::q_d_valid, vehicle_attitude_setpoint_s::roll_body, vehicle_attitude_setpoint_s::thrust_body, vehicle_rates_setpoint_s::timestamp, vehicle_attitude_setpoint_s::timestamp, VEHICLE_TYPE_FIXED_WING, vehicle_attitude_setpoint_s::yaw_body, and vehicle_attitude_setpoint_s::yaw_sp_move_rate.
Referenced by handle_message().
|
private |
Definition at line 654 of file mavlink_receiver.cpp.
References _cmd_pub, px4_custom_mode::data, hrt_absolute_time(), px4_custom_mode::main_mode, uORB::PublicationQueued< T >::publish(), px4_custom_mode::sub_mode, and vehicle_command_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 911 of file mavlink_receiver.cpp.
References _control_mode_sub, _mavlink, _offboard_control_mode_pub, _pos_sp_triplet_pub, _vehicle_local_position_sub, uORB::Subscription::copy(), Mavlink::get_forward_externalsp(), globallocalconverter_init(), globallocalconverter_initialized(), globallocalconverter_tolocal(), hrt_absolute_time(), offboard_control_mode_s::ignore_position, mavlink_system, uORB::Publication< T >::publish(), and position_setpoint_triplet_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 746 of file mavlink_receiver.cpp.
References _control_mode_sub, _mavlink, _offboard_control_mode_pub, _pos_sp_triplet_pub, uORB::Subscription::copy(), Mavlink::get_forward_externalsp(), hrt_absolute_time(), offboard_control_mode_s::ignore_position, mavlink_system, uORB::Publication< T >::publish(), and position_setpoint_triplet_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2609 of file mavlink_receiver.cpp.
References _log_message_pub, hrt_absolute_time(), mavlink_system, uORB::Publication< T >::publish(), log_message_s::severity, and STRINGIFY.
Referenced by handle_message().
|
private |
Definition at line 1736 of file mavlink_receiver.cpp.
References _trajectory_waypoint_pub, hrt_absolute_time(), uORB::Publication< T >::publish(), and vehicle_trajectory_waypoint_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 2264 of file mavlink_receiver.cpp.
References _last_utm_global_pos_com, _transponder_report_pub, hrt_absolute_time(), uORB::PublicationQueued< T >::publish(), and transponder_report_s::timestamp.
Referenced by handle_message().
|
private |
Definition at line 1188 of file mavlink_receiver.cpp.
References _mavlink_timesync, _visual_odometry_pub, matrix::Matrix< Type, M, N >::copyTo(), uORB::Publication< T >::publish(), MavlinkTimesync::sync_stamp(), and vehicle_odometry_s::timestamp.
Referenced by handle_message().
|
privatedelete |
|
static |
Start the receiver thread.
Definition at line 2827 of file mavlink_receiver.cpp.
References MAVLINK_RECEIVER_NET_ADDED_STACK, and start_helper().
Referenced by Mavlink::task_main().
|
private |
Receive data from UART/UDP.
Definition at line 2633 of file mavlink_receiver.cpp.
References _mavlink, _mavlink_ftp, _mavlink_log_handler, _mavlink_timesync, _mission_manager, _parameter_update_sub, _parameters_manager, _status, Mavlink::_task_should_exit, Mavlink::boot_complete(), MavlinkMissionManager::check_active_mission(), uORB::Subscription::copy(), Mavlink::count_rxbytes(), fd, Mavlink::ftp_enabled(), Mavlink::get_baudrate(), Mavlink::get_channel(), Mavlink::get_first_start_time(), Mavlink::get_instance_id(), Mavlink::get_protocol(), Mavlink::get_socket_fd(), Mavlink::get_start_time(), Mavlink::get_status(), Mavlink::get_uart_fd(), MavlinkFTP::handle_message(), MavlinkParametersManager::handle_message(), MavlinkMissionManager::handle_message(), MavlinkLogHandler::handle_message(), MavlinkTimesync::handle_message(), handle_message(), Mavlink::handle_message(), hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), msg, read(), MavlinkFTP::send(), MavlinkParametersManager::send(), MavlinkMissionManager::send(), MavlinkLogHandler::send(), SERIAL, Mavlink::set_boot_complete(), Mavlink::set_proto_version(), and uORB::Subscription::updated().
Referenced by start_helper().
|
private |
Definition at line 336 of file mavlink_receiver.cpp.
References _actuator_armed_sub, _mavlink, uORB::Subscription::copy(), Mavlink::get_channel(), and hrt_absolute_time().
Referenced by handle_message_command_both().
|
private |
Definition at line 353 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::get_channel(), and hrt_absolute_time().
Referenced by handle_message_command_both().
|
private |
Set the interval at which the given message stream is published.
The rate is the number of messages per second.
msgId | The ID of the message interval to be set. |
interval | The interval in usec to send the message. |
data_rate | The total link data rate in bytes per second. |
Definition at line 1973 of file mavlink_receiver.cpp.
References _mavlink, Mavlink::configure_stream_threadsafe(), f(), get_stream_name(), and Mavlink::set_data_rate().
Referenced by handle_message_command_both().
|
static |
Definition at line 2818 of file mavlink_receiver.cpp.
References Run().
Referenced by receive_start().
|
private |
Updates the battery, optical flow, and flight ID subscribed parameters.
|
private |
Definition at line 261 of file mavlink_receiver.h.
Referenced by handle_message_hil_sensor(), and handle_message_hil_state_quaternion().
|
private |
Definition at line 273 of file mavlink_receiver.h.
Referenced by send_flight_information().
|
private |
Definition at line 224 of file mavlink_receiver.h.
Referenced by handle_message_set_actuator_control_target().
|
private |
Definition at line 225 of file mavlink_receiver.h.
Referenced by handle_message_hil_sensor(), and handle_message_hil_state_quaternion().
|
private |
Definition at line 242 of file mavlink_receiver.h.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 241 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 262 of file mavlink_receiver.h.
Referenced by handle_message_hil_sensor().
|
private |
Definition at line 226 of file mavlink_receiver.h.
Referenced by handle_message_battery_status(), handle_message_hil_sensor(), and handle_message_hil_state_quaternion().
|
private |
Definition at line 227 of file mavlink_receiver.h.
Referenced by handle_message_cellular_status().
|
private |
Definition at line 269 of file mavlink_receiver.h.
Referenced by acknowledge(), and handle_message_command_ack().
|
private |
Definition at line 270 of file mavlink_receiver.h.
Referenced by handle_message_command_both(), and handle_message_set_mode().
|
private |
Definition at line 228 of file mavlink_receiver.h.
Referenced by handle_message_collision().
|
private |
Definition at line 274 of file mavlink_receiver.h.
Referenced by handle_message_set_actuator_control_target(), handle_message_set_attitude_target(), handle_message_set_position_target_global_int(), and handle_message_set_position_target_local_ned().
|
private |
Definition at line 229 of file mavlink_receiver.h.
Referenced by handle_message_debug_float_array().
|
private |
Definition at line 230 of file mavlink_receiver.h.
Referenced by handle_message_named_value_float().
|
private |
Definition at line 231 of file mavlink_receiver.h.
Referenced by handle_message_debug().
|
private |
Definition at line 232 of file mavlink_receiver.h.
Referenced by handle_message_debug_vect().
|
private |
Definition at line 255 of file mavlink_receiver.h.
Referenced by handle_message_distance_sensor().
|
private |
Definition at line 256 of file mavlink_receiver.h.
Referenced by handle_message_hil_optical_flow(), and handle_message_optical_flow_rad().
|
private |
Definition at line 239 of file mavlink_receiver.h.
Referenced by handle_message_hil_optical_flow(), and handle_message_optical_flow_rad().
|
private |
Definition at line 233 of file mavlink_receiver.h.
Referenced by handle_message_follow_target().
|
private |
Definition at line 244 of file mavlink_receiver.h.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 245 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 284 of file mavlink_receiver.h.
Referenced by handle_message_gps_global_origin().
|
private |
Definition at line 267 of file mavlink_receiver.h.
Referenced by handle_message_gps_rtcm_data().
|
private |
Definition at line 246 of file mavlink_receiver.h.
Referenced by handle_message_hil_gps().
|
private |
Definition at line 263 of file mavlink_receiver.h.
Referenced by handle_message_hil_sensor(), and handle_message_hil_state_quaternion().
|
private |
Definition at line 287 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 288 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 286 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 247 of file mavlink_receiver.h.
|
private |
Definition at line 234 of file mavlink_receiver.h.
Referenced by handle_message_landing_target().
|
private |
Definition at line 290 of file mavlink_receiver.h.
Referenced by handle_message_utm_global_position().
|
private |
Definition at line 248 of file mavlink_receiver.h.
Referenced by handle_message_hil_state_quaternion().
|
private |
Definition at line 235 of file mavlink_receiver.h.
Referenced by handle_message_statustext().
|
private |
Definition at line 264 of file mavlink_receiver.h.
Referenced by handle_message_hil_sensor().
|
private |
Definition at line 258 of file mavlink_receiver.h.
Referenced by handle_message_manual_control().
|
private |
Definition at line 213 of file mavlink_receiver.h.
Referenced by fill_thrust(), get_message_interval(), handle_message(), handle_message_command_ack(), handle_message_command_both(), handle_message_heartbeat(), handle_message_logging_ack(), handle_message_manual_control(), handle_message_ping(), handle_message_radio_status(), handle_message_rc_channels_override(), handle_message_serial_control(), handle_message_set_attitude_target(), handle_message_set_position_target_global_int(), handle_message_set_position_target_local_ned(), Run(), send_flight_information(), send_storage_information(), and set_message_interval().
|
private |
Definition at line 215 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 216 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 219 of file mavlink_receiver.h.
Referenced by handle_message_att_pos_mocap(), handle_message_landing_target(), handle_message_odometry(), handle_message_vision_position_estimate(), and Run().
|
private |
Definition at line 243 of file mavlink_receiver.h.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 217 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 249 of file mavlink_receiver.h.
Referenced by handle_message_att_pos_mocap(), and handle_message_odometry().
|
private |
Definition at line 281 of file mavlink_receiver.h.
Referenced by decode_switch_pos_n().
|
private |
Definition at line 282 of file mavlink_receiver.h.
Referenced by decode_switch_pos_n(), and handle_message_manual_control().
|
private |
Definition at line 236 of file mavlink_receiver.h.
Referenced by handle_message_obstacle_distance().
|
private |
Definition at line 237 of file mavlink_receiver.h.
Referenced by handle_message_set_actuator_control_target(), handle_message_set_attitude_target(), handle_message_set_position_target_global_int(), and handle_message_set_position_target_local_ned().
|
private |
Definition at line 238 of file mavlink_receiver.h.
Referenced by handle_message_onboard_computer_status().
|
private |
Definition at line 275 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 218 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 259 of file mavlink_receiver.h.
Referenced by handle_message_ping().
|
private |
Definition at line 240 of file mavlink_receiver.h.
Referenced by handle_message_set_position_target_global_int(), and handle_message_set_position_target_local_ned().
|
private |
Definition at line 260 of file mavlink_receiver.h.
Referenced by handle_message_radio_status().
|
private |
Definition at line 251 of file mavlink_receiver.h.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 257 of file mavlink_receiver.h.
Referenced by handle_message_manual_control(), and handle_message_rc_channels_override().
|
private |
receiver status, used for mavlink_parse_char()
Definition at line 221 of file mavlink_receiver.h.
Referenced by Run().
|
private |
Definition at line 252 of file mavlink_receiver.h.
Referenced by handle_message_trajectory_representation_waypoints().
|
private |
Definition at line 268 of file mavlink_receiver.h.
Referenced by handle_message_adsb_vehicle(), and handle_message_utm_global_position().
|
private |
Definition at line 276 of file mavlink_receiver.h.
|
private |
Definition at line 277 of file mavlink_receiver.h.
Referenced by handle_message_set_position_target_global_int().
|
private |
Definition at line 278 of file mavlink_receiver.h.
Referenced by handle_message_set_attitude_target().
|
private |
Definition at line 250 of file mavlink_receiver.h.
Referenced by handle_message_odometry(), and handle_message_vision_position_estimate().
|
staticprivate |
Definition at line 280 of file mavlink_receiver.h.
Referenced by decode_switch_pos_n().