32 #ifndef ROSFLIGHT_FIRMWARE_MAVLINK_H 33 #define ROSFLIGHT_FIRMWARE_MAVLINK_H 35 #pragma GCC diagnostic push 36 #pragma GCC diagnostic ignored "-Wpedantic" 37 #pragma GCC diagnostic ignored "-Wswitch-default" 38 #pragma GCC diagnostic ignored "-Wcast-align" 40 # pragma GCC diagnostic pop 54 void init(uint32_t baud_rate, uint32_t dev)
override;
58 uint64_t timestamp_us,
63 void send_diff_pressure(uint8_t system_id,
float velocity,
float pressure,
float temperature)
override;
65 void send_imu(uint8_t system_id, uint64_t timestamp_us,
68 float temperature)
override;
72 void send_named_value_float(uint8_t system_id, uint32_t timestamp_ms,
const char *
const name,
float value)
override;
73 void send_output_raw(uint8_t system_id, uint32_t timestamp_ms,
const float raw_outputs[8])
override;
76 const char *
const name,
78 uint16_t param_count)
override;
81 const char *
const name,
83 uint16_t param_count)
override;
84 void send_rc_raw(uint8_t system_id, uint32_t timestamp_ms,
const uint16_t
channels[8])
override;
85 void send_sonar(uint8_t system_id, uint8_t type,
float range,
float max_range,
86 float min_range)
override;
95 int16_t loop_time_us)
override;
96 void send_timesync(uint8_t system_id, int64_t tc1, int64_t ts1)
override;
97 void send_version(uint8_t system_id,
const char *
const version)
override;
98 virtual void send_gnss(uint8_t system_id, uint32_t time_of_week, uint8_t fix_type, uint64_t time, uint64_t nanos,
100 int32_t lon, int32_t height, int32_t vel_n, int32_t vel_e, int32_t vel_d, uint32_t h_acc, uint32_t v_acc,
101 int32_t ecef_x, int32_t ecef_y, int32_t ecef_z, uint32_t p_acc, int32_t ecef_v_x, int32_t ecef_v_y,
102 int32_t ecef_v_z, uint32_t s_acc, uint64_t rosflight_timestamp);
103 void send_gnss_raw(uint8_t system_id, uint32_t time_of_week, uint16_t year, uint8_t month, uint8_t day,
104 uint8_t hour, uint8_t min, uint8_t sec, uint8_t valid, uint32_t t_acc,
105 int32_t nano, uint8_t fix_type, uint8_t num_sat,
106 int32_t lon, int32_t lat, int32_t height, int32_t height_msl,
107 uint32_t h_acc, uint32_t v_acc, int32_t vel_n, int32_t vel_e,
108 int32_t vel_d, int32_t g_speed, int32_t head_mot, uint32_t s_acc,
109 uint32_t head_acc, uint16_t p_dop, uint64_t rosflight_timestamp);
135 #endif // ROSFLIGHT_FIRMWARE_MAVLINK_H void handle_msg_timesync(const mavlink_message_t *const msg)
void handle_msg_attitude_correction(const mavlink_message_t *const msg)
void handle_msg_offboard_control(const mavlink_message_t *const msg)
static volatile int16_t gyro[3]
void send_version(uint8_t system_id, const char *const version) override
void send_mag(uint8_t system_id, const turbomath::Vector &mag) override
void send_output_raw(uint8_t system_id, uint32_t timestamp_ms, const float raw_outputs[8]) override
void send_heartbeat(uint8_t system_id, bool fixed_wing) override
mavlink_message_t in_buf_
void send_diff_pressure(uint8_t system_id, float velocity, float pressure, float temperature) override
void send_timesync(uint8_t system_id, int64_t tc1, int64_t ts1) override
void send_baro(uint8_t system_id, float altitude, float pressure, float temperature) override
void send_gnss_raw(uint8_t system_id, uint32_t time_of_week, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec, uint8_t valid, uint32_t t_acc, int32_t nano, uint8_t fix_type, uint8_t num_sat, int32_t lon, int32_t lat, int32_t height, int32_t height_msl, uint32_t h_acc, uint32_t v_acc, int32_t vel_n, int32_t vel_e, int32_t vel_d, int32_t g_speed, int32_t head_mot, uint32_t s_acc, uint32_t head_acc, uint16_t p_dop, uint64_t rosflight_timestamp)
void send_attitude_quaternion(uint8_t system_id, uint64_t timestamp_us, const turbomath::Quaternion &attitude, const turbomath::Vector &angular_velocity) override
void send_param_value_int(uint8_t system_id, uint16_t index, const char *const name, int32_t value, uint16_t param_count) override
void handle_msg_rosflight_cmd(const mavlink_message_t *const msg)
virtual void send_gnss(uint8_t system_id, uint32_t time_of_week, uint8_t fix_type, uint64_t time, uint64_t nanos, int32_t lat, int32_t lon, int32_t height, int32_t vel_n, int32_t vel_e, int32_t vel_d, uint32_t h_acc, uint32_t v_acc, int32_t ecef_x, int32_t ecef_y, int32_t ecef_z, uint32_t p_acc, int32_t ecef_v_x, int32_t ecef_v_y, int32_t ecef_v_z, uint32_t s_acc, uint64_t rosflight_timestamp)
void send_sonar(uint8_t system_id, uint8_t type, float range, float max_range, float min_range) override
void send_message(const mavlink_message_t &msg)
MAVLink comm protocol built from rosflight.xml.
void send_status(uint8_t system_id, bool armed, bool failsafe, bool rc_override, bool offboard, uint8_t error_code, uint8_t control_mode, int16_t num_errors, int16_t loop_time_us) override
static volatile int16_t accel[3]
ROSLIB_DECL std::string command(const std::string &cmd)
static const channelConfig_t channels[CC_CHANNELS_PER_TIMER]
void send_named_value_int(uint8_t system_id, uint32_t timestamp_ms, const char *const name, int32_t value) override
void init(uint32_t baud_rate, uint32_t dev) override
void send_named_value_float(uint8_t system_id, uint32_t timestamp_ms, const char *const name, float value) override
void send_error_data(uint8_t system_id, const BackupData &error_data)
void handle_msg_param_request_list(const mavlink_message_t *const msg)
void handle_mavlink_message(void)
void handle_msg_param_request_read(const mavlink_message_t *const msg)
void handle_msg_heartbeat(const mavlink_message_t *const msg)
void send_log_message(uint8_t system_id, LogSeverity severity, const char *text) override
void send_rc_raw(uint8_t system_id, uint32_t timestamp_ms, const uint16_t channels[8]) override
void send_imu(uint8_t system_id, uint64_t timestamp_us, const turbomath::Vector &accel, const turbomath::Vector &gyro, float temperature) override
void handle_msg_param_set(const mavlink_message_t *const msg)
void send_param_value_float(uint8_t system_id, uint16_t index, const char *const name, float value, uint16_t param_count) override
void send_command_ack(uint8_t system_id, Command command, bool success) override