From ffb9e8716196389cadf8b73f6488c5f5229b3381 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:33:26 +0200 Subject: [PATCH 01/12] Converted satellite_info topic to generated topic --- msg/satellite_info.msg | 9 +++++++++ src/drivers/gps/ashtech.cpp | 2 +- src/drivers/gps/ashtech.h | 14 +++++++------- src/drivers/gps/ubx.cpp | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 msg/satellite_info.msg diff --git a/msg/satellite_info.msg b/msg/satellite_info.msg new file mode 100644 index 0000000000..24cb03facc --- /dev/null +++ b/msg/satellite_info.msg @@ -0,0 +1,9 @@ +uint8 SAT_INFO_MAX_SATELLITES = 20 + +uint64 timestamp # Timestamp of satellite info +uint8 count # Number of satellites in satellite info +uint8[20] svid # Space vehicle ID [1..255], see scheme below +uint8[20] used # 0: Satellite not used, 1: used for navigation +uint8[20] elevation # Elevation (0: right on top of receiver, 90: on the horizon) of satellite +uint8[20] azimuth # Direction of satellite, 0: 0 deg, 255: 360 deg. +uint8[20] snr # dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. diff --git a/src/drivers/gps/ashtech.cpp b/src/drivers/gps/ashtech.cpp index c881344923..eca775745f 100644 --- a/src/drivers/gps/ashtech.cpp +++ b/src/drivers/gps/ashtech.cpp @@ -472,7 +472,7 @@ int ASHTECH::handle_message(int len) if (this_msg_num == all_msg_num) { end = tot_sv_visible - (this_msg_num - 1) * 4; _gps_position->satellites_used = tot_sv_visible; - _satellite_info->count = SAT_INFO_MAX_SATELLITES; + _satellite_info->count = satellite_info_s::SAT_INFO_MAX_SATELLITES; _satellite_info->timestamp = hrt_absolute_time(); } diff --git a/src/drivers/gps/ashtech.h b/src/drivers/gps/ashtech.h index 6ba522b9c5..e7b9e40328 100644 --- a/src/drivers/gps/ashtech.h +++ b/src/drivers/gps/ashtech.h @@ -42,10 +42,10 @@ #ifndef RECV_BUFFER_SIZE #define RECV_BUFFER_SIZE 512 - -#define SAT_INFO_MAX_SATELLITES 20 #endif +#include + class ASHTECH : public GPS_Helper { @@ -70,11 +70,11 @@ class ASHTECH : public GPS_Helper bool _gsv_in_progress; /**< Indicates that gsv data parsing is in progress */ /* int _satellites_count; **< Number of satellites info parsed. */ uint8_t count; /**< Number of satellites in satellite info */ - uint8_t svid[SAT_INFO_MAX_SATELLITES]; /**< Space vehicle ID [1..255], see scheme below */ - uint8_t used[SAT_INFO_MAX_SATELLITES]; /**< 0: Satellite not used, 1: used for navigation */ - uint8_t elevation[SAT_INFO_MAX_SATELLITES]; /**< Elevation (0: right on top of receiver, 90: on the horizon) of satellite */ - uint8_t azimuth[SAT_INFO_MAX_SATELLITES]; /**< Direction of satellite, 0: 0 deg, 255: 360 deg. */ - uint8_t snr[SAT_INFO_MAX_SATELLITES]; /**< dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. */ + uint8_t svid[satellite_info_s::SAT_INFO_MAX_SATELLITES]; /**< Space vehicle ID [1..255], see scheme below */ + uint8_t used[satellite_info_s::SAT_INFO_MAX_SATELLITES]; /**< 0: Satellite not used, 1: used for navigation */ + uint8_t elevation[satellite_info_s::SAT_INFO_MAX_SATELLITES]; /**< Elevation (0: right on top of receiver, 90: on the horizon) of satellite */ + uint8_t azimuth[satellite_info_s::SAT_INFO_MAX_SATELLITES]; /**< Direction of satellite, 0: 0 deg, 255: 360 deg. */ + uint8_t snr[satellite_info_s::SAT_INFO_MAX_SATELLITES]; /**< dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. */ public: ASHTECH(const int &fd, struct vehicle_gps_position_s *gps_position, struct satellite_info_s *satellite_info); diff --git a/src/drivers/gps/ubx.cpp b/src/drivers/gps/ubx.cpp index 81b580892b..a7247a262d 100644 --- a/src/drivers/gps/ubx.cpp +++ b/src/drivers/gps/ubx.cpp @@ -627,7 +627,7 @@ UBX::payload_rx_add_nav_svinfo(const uint8_t b) } else { if (_rx_payload_index == sizeof(ubx_payload_rx_nav_svinfo_part1_t)) { // Part 1 complete: decode Part 1 buffer - _satellite_info->count = MIN(_buf.payload_rx_nav_svinfo_part1.numCh, SAT_INFO_MAX_SATELLITES); + _satellite_info->count = MIN(_buf.payload_rx_nav_svinfo_part1.numCh, satellite_info_s::SAT_INFO_MAX_SATELLITES); UBX_TRACE_SVINFO("SVINFO len %u numCh %u\n", (unsigned)_rx_payload_length, (unsigned)_buf.payload_rx_nav_svinfo_part1.numCh); } if (_rx_payload_index < sizeof(ubx_payload_rx_nav_svinfo_part1_t) + _satellite_info->count * sizeof(ubx_payload_rx_nav_svinfo_part2_t)) { From c3d10c4cb309bcf1d260f257a569b86e0edeb19a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:33:45 +0200 Subject: [PATCH 02/12] Converted multirotor motor limits to generated topic --- msg/multirotor_motor_limits.msg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 msg/multirotor_motor_limits.msg diff --git a/msg/multirotor_motor_limits.msg b/msg/multirotor_motor_limits.msg new file mode 100644 index 0000000000..2e03afc040 --- /dev/null +++ b/msg/multirotor_motor_limits.msg @@ -0,0 +1,4 @@ +uint8 lower_limit # at least one actuator command has saturated on the lower limit +uint8 upper_limit # at least one actuator command has saturated on the upper limit +uint8 yaw # yaw limit reached +uint8 reserved # reserved From 16cb9edf19853a3ba603c8cd7ee548d74023a8bc Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:34:35 +0200 Subject: [PATCH 03/12] Converted telemetry status topic to generated topic --- msg/telemetry_status.msg | 18 +++++++++++++ src/modules/mavlink/mavlink_main.cpp | 6 ++--- src/modules/mavlink/mavlink_receiver.cpp | 34 +++++++++++++++++------- 3 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 msg/telemetry_status.msg diff --git a/msg/telemetry_status.msg b/msg/telemetry_status.msg new file mode 100644 index 0000000000..221dab79e0 --- /dev/null +++ b/msg/telemetry_status.msg @@ -0,0 +1,18 @@ +uint8 TELEMETRY_STATUS_RADIO_TYPE_GENERIC = 0 +uint8 TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO = 1 +uint8 TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET = 2 +uint8 TELEMETRY_STATUS_RADIO_TYPE_WIRE = 3 + +uint64 timestamp +uint64 heartbeat_time # Time of last received heartbeat from remote system +uint64 telem_time # Time of last received telemetry status packet, 0 for none +uint8 type # type of the radio hardware +uint8 rssi # local signal strength +uint8 remote_rssi # remote signal strength +uint16 rxerrors # receive errors +uint16 fixed # count of error corrected packets +uint8 noise # background noise level +uint8 remote_noise # remote background noise level +uint8 txbuf # how full the tx buffer is as a percentage +uint8 system_id # system id of the remote system +uint8 component_id # component id of the remote system diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 0e9c7b8eb3..a39f33f9fb 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -246,7 +246,7 @@ Mavlink::Mavlink() : break; } - _rstatus.type = TELEMETRY_STATUS_RADIO_TYPE_GENERIC; + _rstatus.type = telemetry_status_s::TELEMETRY_STATUS_RADIO_TYPE_GENERIC; } Mavlink::~Mavlink() @@ -1721,7 +1721,7 @@ Mavlink::task_main(int argc, char *argv[]) } /* radio config check */ - if (_radio_id != 0 && _rstatus.type == TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO) { + if (_radio_id != 0 && _rstatus.type == telemetry_status_s::TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO) { /* request to configure radio and radio is present */ FILE *fs = fdopen(_uart_fd, "w"); @@ -2013,7 +2013,7 @@ Mavlink::display_status() printf("\ttype:\t\t"); switch (_rstatus.type) { - case TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO: + case telemetry_status_s::TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO: printf("3DR RADIO\n"); break; diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index f068a25189..55c4597677 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -281,7 +281,21 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg) mavlink_command_long_t cmd_mavlink; mavlink_msg_command_long_decode(msg, &cmd_mavlink); - if (cmd_mavlink.target_system == mavlink_system.sysid && ((cmd_mavlink.target_component == mavlink_system.compid) + /* evaluate if this system should accept this command */ + bool target_ok; + switch (cmd_mavlink.command) { + + case MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES: + /* broadcast */ + target_ok = (cmd_mavlink.target_system == 0); + break; + + default: + target_ok = (cmd_mavlink.target_system == mavlink_system.sysid); + break; + } + + if (target_ok && ((cmd_mavlink.target_component == mavlink_system.compid) || (cmd_mavlink.target_component == MAV_COMP_ID_ALL))) { //check for MAVLINK terminate command if (cmd_mavlink.command == MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN && ((int)cmd_mavlink.param1) == 3) { @@ -942,8 +956,8 @@ MavlinkReceiver::handle_message_set_attitude_target(mavlink_message_t *msg) void MavlinkReceiver::handle_message_radio_status(mavlink_message_t *msg) { - /* telemetry status supported only on first TELEMETRY_STATUS_ORB_ID_NUM mavlink channels */ - if (_mavlink->get_channel() < TELEMETRY_STATUS_ORB_ID_NUM) { + /* telemetry status supported only on first ORB_MULTI_MAX_INSTANCES mavlink channels */ + if (_mavlink->get_channel() < ORB_MULTI_MAX_INSTANCES) { mavlink_radio_status_t rstatus; mavlink_msg_radio_status_decode(msg, &rstatus); @@ -952,7 +966,7 @@ MavlinkReceiver::handle_message_radio_status(mavlink_message_t *msg) tstatus.timestamp = hrt_absolute_time(); tstatus.telem_time = tstatus.timestamp; /* tstatus.heartbeat_time is set by system heartbeats */ - tstatus.type = TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO; + tstatus.type = telemetry_status_s::TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO; tstatus.rssi = rstatus.rssi; tstatus.remote_rssi = rstatus.remrssi; tstatus.txbuf = rstatus.txbuf; @@ -964,10 +978,11 @@ MavlinkReceiver::handle_message_radio_status(mavlink_message_t *msg) tstatus.component_id = msg->compid; if (_telemetry_status_pub == nullptr) { - _telemetry_status_pub = orb_advertise(telemetry_status_orb_id[_mavlink->get_channel()], &tstatus); + int multi_instance; + _telemetry_status_pub = orb_advertise_multi(ORB_ID(telemetry_status), &tstatus, &multi_instance, ORB_PRIO_HIGH); } else { - orb_publish(telemetry_status_orb_id[_mavlink->get_channel()], _telemetry_status_pub, &tstatus); + orb_publish(ORB_ID(telemetry_status), _telemetry_status_pub, &tstatus); } } } @@ -1156,7 +1171,7 @@ void MavlinkReceiver::handle_message_heartbeat(mavlink_message_t *msg) { /* telemetry status supported only on first TELEMETRY_STATUS_ORB_ID_NUM mavlink channels */ - if (_mavlink->get_channel() < TELEMETRY_STATUS_ORB_ID_NUM) { + if (_mavlink->get_channel() < ORB_MULTI_MAX_INSTANCES) { mavlink_heartbeat_t hb; mavlink_msg_heartbeat_decode(msg, &hb); @@ -1172,10 +1187,11 @@ MavlinkReceiver::handle_message_heartbeat(mavlink_message_t *msg) tstatus.heartbeat_time = tstatus.timestamp; if (_telemetry_status_pub == nullptr) { - _telemetry_status_pub = orb_advertise(telemetry_status_orb_id[_mavlink->get_channel()], &tstatus); + int multi_instance; + _telemetry_status_pub = orb_advertise_multi(ORB_ID(telemetry_status), &tstatus, &multi_instance, ORB_PRIO_HIGH); } else { - orb_publish(telemetry_status_orb_id[_mavlink->get_channel()], _telemetry_status_pub, &tstatus); + orb_publish(ORB_ID(telemetry_status), _telemetry_status_pub, &tstatus); } } } From 3ff8afb6ba0c3f698333370acc57e38e1d1b5538 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:34:48 +0200 Subject: [PATCH 04/12] Commander update for telemetry status --- src/modules/commander/commander.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 478bb85b73..6a384b781d 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1074,12 +1074,12 @@ int commander_thread_main(int argc, char *argv[]) memset(&offboard_control_mode, 0, sizeof(offboard_control_mode)); /* Subscribe to telemetry status topics */ - int telemetry_subs[TELEMETRY_STATUS_ORB_ID_NUM]; - uint64_t telemetry_last_heartbeat[TELEMETRY_STATUS_ORB_ID_NUM]; - uint64_t telemetry_last_dl_loss[TELEMETRY_STATUS_ORB_ID_NUM]; - bool telemetry_lost[TELEMETRY_STATUS_ORB_ID_NUM]; + int telemetry_subs[ORB_MULTI_MAX_INSTANCES]; + uint64_t telemetry_last_heartbeat[ORB_MULTI_MAX_INSTANCES]; + uint64_t telemetry_last_dl_loss[ORB_MULTI_MAX_INSTANCES]; + bool telemetry_lost[ORB_MULTI_MAX_INSTANCES]; - for (int i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) { + for (int i = 0; i < ORB_MULTI_MAX_INSTANCES; i++) { telemetry_subs[i] = -1; telemetry_last_heartbeat[i] = 0; telemetry_last_dl_loss[i] = 0; @@ -1340,10 +1340,10 @@ int commander_thread_main(int argc, char *argv[]) } } - for (int i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) { + for (int i = 0; i < ORB_MULTI_MAX_INSTANCES; i++) { - if (telemetry_subs[i] < 0 && (OK == orb_exists(telemetry_status_orb_id[i], 0))) { - telemetry_subs[i] = orb_subscribe(telemetry_status_orb_id[i]); + if (telemetry_subs[i] < 0 && (OK == orb_exists(ORB_ID(telemetry_status), i))) { + telemetry_subs[i] = orb_subscribe_multi(ORB_ID(telemetry_status), i); } orb_check(telemetry_subs[i], &updated); @@ -1352,7 +1352,7 @@ int commander_thread_main(int argc, char *argv[]) struct telemetry_status_s telemetry; memset(&telemetry, 0, sizeof(telemetry)); - orb_copy(telemetry_status_orb_id[i], telemetry_subs[i], &telemetry); + orb_copy(ORB_ID(telemetry_status), telemetry_subs[i], &telemetry); /* perform system checks when new telemetry link connected */ if ( @@ -1951,7 +1951,7 @@ int commander_thread_main(int argc, char *argv[]) /* data links check */ bool have_link = false; - for (int i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) { + for (int i = 0; i < ORB_MULTI_MAX_INSTANCES; i++) { if (telemetry_last_heartbeat[i] != 0 && hrt_elapsed_time(&telemetry_last_heartbeat[i]) < datalink_loss_timeout * 1e6) { /* handle the case where data link was gained first time or regained, From b3c1d5692669e72ca41c15152b8028e78532281c Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:35:10 +0200 Subject: [PATCH 05/12] sdlog2 update for generated topics --- src/modules/sdlog2/sdlog2.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index 10a07323c6..bd57ca3914 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -229,6 +229,7 @@ static void *logwriter_thread(void *arg); __EXPORT int sdlog2_main(int argc, char *argv[]); static bool copy_if_updated(orb_id_t topic, int *handle, void *buffer); +static bool copy_if_updated_multi(orb_id_t topic, int multi_instance, int *handle, void *buffer); /** * Mainloop of sd log deamon. @@ -844,11 +845,16 @@ int write_parameters(int fd) } bool copy_if_updated(orb_id_t topic, int *handle, void *buffer) +{ + return copy_if_updated_multi(topic, 0, handle, buffer); +} + +bool copy_if_updated_multi(orb_id_t topic, int multi_instance, int *handle, void *buffer) { bool updated = false; if (*handle < 0) { - if (OK == orb_exists(topic, 0)) { + if (OK == orb_exists(topic, multi_instance)) { *handle = orb_subscribe(topic); /* copy first data */ if (*handle >= 0) { @@ -1175,7 +1181,7 @@ int sdlog2_thread_main(int argc, char *argv[]) int esc_sub; int global_vel_sp_sub; int battery_sub; - int telemetry_subs[TELEMETRY_STATUS_ORB_ID_NUM]; + int telemetry_subs[ORB_MULTI_MAX_INSTANCES]; int distance_sensor_sub; int estimator_status_sub; int tecs_status_sub; @@ -1223,7 +1229,7 @@ int sdlog2_thread_main(int argc, char *argv[]) /* add new topics HERE */ - for (unsigned i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) { + for (unsigned i = 0; i < ORB_MULTI_MAX_INSTANCES; i++) { subs.telemetry_subs[i] = -1; } @@ -1808,8 +1814,8 @@ int sdlog2_thread_main(int argc, char *argv[]) } /* --- TELEMETRY --- */ - for (unsigned i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) { - if (copy_if_updated(telemetry_status_orb_id[i], &subs.telemetry_subs[i], &buf.telemetry)) { + for (unsigned i = 0; i < ORB_MULTI_MAX_INSTANCES; i++) { + if (copy_if_updated_multi(ORB_ID(telemetry_status), i, &subs.telemetry_subs[i], &buf.telemetry)) { log_msg.msg_type = LOG_TEL0_MSG + i; log_msg.body.log_TEL.rssi = buf.telemetry.rssi; log_msg.body.log_TEL.remote_rssi = buf.telemetry.remote_rssi; From 9df860e92177faf6cf3e137fdd4c55a1311c5eea Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:35:29 +0200 Subject: [PATCH 06/12] update uORB for generated topics --- src/modules/uORB/objects_common.cpp | 5 +- .../uORB/topics/multirotor_motor_limits.h | 40 ++++---- src/modules/uORB/topics/safety.h | 46 ++++++---- src/modules/uORB/topics/satellite_info.h | 64 ++++++------- src/modules/uORB/topics/telemetry_status.h | 91 ++++++++----------- 5 files changed, 118 insertions(+), 128 deletions(-) diff --git a/src/modules/uORB/objects_common.cpp b/src/modules/uORB/objects_common.cpp index 81aeec8967..df56e931ca 100644 --- a/src/modules/uORB/objects_common.cpp +++ b/src/modules/uORB/objects_common.cpp @@ -210,10 +210,7 @@ ORB_DEFINE(actuator_direct, struct actuator_direct_s); ORB_DEFINE(multirotor_motor_limits, struct multirotor_motor_limits_s); #include "topics/telemetry_status.h" -ORB_DEFINE(telemetry_status_0, struct telemetry_status_s); -ORB_DEFINE(telemetry_status_1, struct telemetry_status_s); -ORB_DEFINE(telemetry_status_2, struct telemetry_status_s); -ORB_DEFINE(telemetry_status_3, struct telemetry_status_s); +ORB_DEFINE(telemetry_status, struct telemetry_status_s); #include "topics/test_motor.h" ORB_DEFINE(test_motor, struct test_motor_s); diff --git a/src/modules/uORB/topics/multirotor_motor_limits.h b/src/modules/uORB/topics/multirotor_motor_limits.h index 30fd96b938..8f0fce1dd0 100644 --- a/src/modules/uORB/topics/multirotor_motor_limits.h +++ b/src/modules/uORB/topics/multirotor_motor_limits.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2012-2013 PX4 Development Team. All rights reserved. + * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,31 +31,37 @@ * ****************************************************************************/ -/** - * @file multirotor_motor_limits.h - * - * Definition of multirotor_motor_limits topic - */ +/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/multirotor_motor_limits.msg */ -#ifndef MULTIROTOR_MOTOR_LIMITS_H_ -#define MULTIROTOR_MOTOR_LIMITS_H_ -#include "../uORB.h" +#pragma once + #include +#include + + +#ifndef __cplusplus + +#endif /** * @addtogroup topics * @{ */ -/** - * Motor limits - */ + +#ifdef __cplusplus +struct __EXPORT multirotor_motor_limits_s { +#else struct multirotor_motor_limits_s { - uint8_t lower_limit : 1; // at least one actuator command has saturated on the lower limit - uint8_t upper_limit : 1; // at least one actuator command has saturated on the upper limit - uint8_t yaw : 1; // yaw limit reached - uint8_t reserved : 5; // reserved +#endif + uint8_t lower_limit; + uint8_t upper_limit; + uint8_t yaw; + uint8_t reserved; +#ifdef __cplusplus + +#endif }; /** @@ -64,5 +70,3 @@ struct multirotor_motor_limits_s { /* register this as object request broker structure */ ORB_DECLARE(multirotor_motor_limits); - -#endif diff --git a/src/modules/uORB/topics/safety.h b/src/modules/uORB/topics/safety.h index a5d21cd4ad..7cb3219788 100644 --- a/src/modules/uORB/topics/safety.h +++ b/src/modules/uORB/topics/safety.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2013 PX4 Development Team. All rights reserved. + * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,27 +31,41 @@ * ****************************************************************************/ -/** - * @file safety.h - * - * Safety topic to pass safety state from px4io driver to commander - * This concerns only the safety button of the px4io but has nothing to do - * with arming/disarming. - */ +/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/safety.msg */ -#ifndef TOPIC_SAFETY_H -#define TOPIC_SAFETY_H + +#pragma once #include -#include "../uORB.h" +#include + +#ifndef __cplusplus + +#endif + +/** + * @addtogroup topics + * @{ + */ + + +#ifdef __cplusplus +struct __EXPORT safety_s { +#else struct safety_s { +#endif + uint64_t timestamp; + bool safety_switch_available; + bool safety_off; +#ifdef __cplusplus - uint64_t timestamp; - bool safety_switch_available; /**< Set to true if a safety switch is connected */ - bool safety_off; /**< Set to true if safety is off */ +#endif }; -ORB_DECLARE(safety); +/** + * @} + */ -#endif \ No newline at end of file +/* register this as object request broker structure */ +ORB_DECLARE(safety); diff --git a/src/modules/uORB/topics/satellite_info.h b/src/modules/uORB/topics/satellite_info.h index 37c2faa962..fc06e89a6d 100644 --- a/src/modules/uORB/topics/satellite_info.h +++ b/src/modules/uORB/topics/satellite_info.h @@ -1,9 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014 PX4 Development Team. All rights reserved. - * Author: @author Thomas Gubler - * @author Julian Oes - * @author Lorenz Meier + * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,50 +31,43 @@ * ****************************************************************************/ -/** - * @file satellite_info.h - * Definition of the GNSS satellite info uORB topic. - */ +/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/satellite_info.msg */ -#ifndef TOPIC_SAT_INFO_H_ -#define TOPIC_SAT_INFO_H_ + +#pragma once #include -#include "../uORB.h" +#include + + +#ifndef __cplusplus +#define SAT_INFO_MAX_SATELLITES 20 + +#endif /** * @addtogroup topics * @{ */ -/** - * GNSS Satellite Info. - */ - -#define SAT_INFO_MAX_SATELLITES 20 +#ifdef __cplusplus +struct __EXPORT satellite_info_s { +#else struct satellite_info_s { - uint64_t timestamp; /**< Timestamp of satellite info */ - uint8_t count; /**< Number of satellites in satellite info */ - uint8_t svid[SAT_INFO_MAX_SATELLITES]; /**< Space vehicle ID [1..255], see scheme below */ - uint8_t used[SAT_INFO_MAX_SATELLITES]; /**< 0: Satellite not used, 1: used for navigation */ - uint8_t elevation[SAT_INFO_MAX_SATELLITES]; /**< Elevation (0: right on top of receiver, 90: on the horizon) of satellite */ - uint8_t azimuth[SAT_INFO_MAX_SATELLITES]; /**< Direction of satellite, 0: 0 deg, 255: 360 deg. */ - uint8_t snr[SAT_INFO_MAX_SATELLITES]; /**< dBHz, Signal to noise ratio of satellite C/N0, range 0..99, zero when not tracking this satellite. */ -}; +#endif + uint64_t timestamp; + uint8_t count; + uint8_t svid[20]; + uint8_t used[20]; + uint8_t elevation[20]; + uint8_t azimuth[20]; + uint8_t snr[20]; +#ifdef __cplusplus + static const uint8_t SAT_INFO_MAX_SATELLITES = 20; -/** - * NAV_SVINFO space vehicle ID (svid) scheme according to u-blox protocol specs - * u-bloxM8-V15_ReceiverDescriptionProtocolSpec_Public_(UBX-13003221).pdf - * - * GPS 1-32 - * SBAS 120-158 - * Galileo 211-246 - * BeiDou 159-163, 33-64 - * QZSS 193-197 - * GLONASS 65-96, 255 - * - */ +#endif +}; /** * @} @@ -85,5 +75,3 @@ struct satellite_info_s { /* register this as object request broker structure */ ORB_DECLARE(satellite_info); - -#endif diff --git a/src/modules/uORB/topics/telemetry_status.h b/src/modules/uORB/topics/telemetry_status.h index ee950f4db2..1a38366e9e 100644 --- a/src/modules/uORB/topics/telemetry_status.h +++ b/src/modules/uORB/topics/telemetry_status.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 PX4 Development Team. All rights reserved. + * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,72 +31,59 @@ * ****************************************************************************/ -/** - * @file telemetry_status.h - * - * Telemetry status topics - radio status outputs - */ +/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/telemetry_status.msg */ -#ifndef TOPIC_TELEMETRY_STATUS_H -#define TOPIC_TELEMETRY_STATUS_H + +#pragma once #include -#include "../uORB.h" +#include -enum TELEMETRY_STATUS_RADIO_TYPE { - TELEMETRY_STATUS_RADIO_TYPE_GENERIC = 0, - TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO, - TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET, - TELEMETRY_STATUS_RADIO_TYPE_WIRE -}; + +#ifndef __cplusplus +#define TELEMETRY_STATUS_RADIO_TYPE_GENERIC 0 +#define TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO 1 +#define TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET 2 +#define TELEMETRY_STATUS_RADIO_TYPE_WIRE 3 + +#endif /** * @addtogroup topics * @{ */ + +#ifdef __cplusplus +struct __EXPORT telemetry_status_s { +#else struct telemetry_status_s { +#endif uint64_t timestamp; - uint64_t heartbeat_time; /**< Time of last received heartbeat from remote system */ - uint64_t telem_time; /**< Time of last received telemetry status packet, 0 for none */ - enum TELEMETRY_STATUS_RADIO_TYPE type; /**< type of the radio hardware */ - uint8_t rssi; /**< local signal strength */ - uint8_t remote_rssi; /**< remote signal strength */ - uint16_t rxerrors; /**< receive errors */ - uint16_t fixed; /**< count of error corrected packets */ - uint8_t noise; /**< background noise level */ - uint8_t remote_noise; /**< remote background noise level */ - uint8_t txbuf; /**< how full the tx buffer is as a percentage */ - uint8_t system_id; /**< system id of the remote system */ - uint8_t component_id; /**< component id of the remote system */ + uint64_t heartbeat_time; + uint64_t telem_time; + uint8_t type; + uint8_t rssi; + uint8_t remote_rssi; + uint16_t rxerrors; + uint16_t fixed; + uint8_t noise; + uint8_t remote_noise; + uint8_t txbuf; + uint8_t system_id; + uint8_t component_id; +#ifdef __cplusplus + static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_GENERIC = 0; + static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO = 1; + static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET = 2; + static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_WIRE = 3; + +#endif }; /** * @} */ -ORB_DECLARE(telemetry_status_0); -ORB_DECLARE(telemetry_status_1); -ORB_DECLARE(telemetry_status_2); -ORB_DECLARE(telemetry_status_3); - -#define TELEMETRY_STATUS_ORB_ID_NUM 4 - -static const struct orb_metadata *telemetry_status_orb_id[TELEMETRY_STATUS_ORB_ID_NUM] = { - ORB_ID(telemetry_status_0), - ORB_ID(telemetry_status_1), - ORB_ID(telemetry_status_2), - ORB_ID(telemetry_status_3), -}; - -// This is a hack to quiet an unused-variable warning for when telemetry_status.h is -// included but telemetry_status_orb_id is not referenced. The inline works if you -// choose to use it, but you can continue to just directly index into the array as well. -// If you don't use the inline this ends up being a no-op with no additional code emitted. -//static const struct orb_metadata *telemetry_status_orb_id_lookup(size_t index); -static inline const struct orb_metadata *telemetry_status_orb_id_lookup(size_t index) -{ - return telemetry_status_orb_id[index]; -} - -#endif /* TOPIC_TELEMETRY_STATUS_H */ +/* register this as object request broker structure */ +ORB_DECLARE(telemetry_status); From d8b1a8a17f68bcf56839a8203417e5dd104f737a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:35:58 +0200 Subject: [PATCH 07/12] uORB: Remove intermediate file --- .../uORB/topics/multirotor_motor_limits.h | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/modules/uORB/topics/multirotor_motor_limits.h diff --git a/src/modules/uORB/topics/multirotor_motor_limits.h b/src/modules/uORB/topics/multirotor_motor_limits.h deleted file mode 100644 index 8f0fce1dd0..0000000000 --- a/src/modules/uORB/topics/multirotor_motor_limits.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * - * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/multirotor_motor_limits.msg */ - - -#pragma once - -#include -#include - - -#ifndef __cplusplus - -#endif - -/** - * @addtogroup topics - * @{ - */ - - -#ifdef __cplusplus -struct __EXPORT multirotor_motor_limits_s { -#else -struct multirotor_motor_limits_s { -#endif - uint8_t lower_limit; - uint8_t upper_limit; - uint8_t yaw; - uint8_t reserved; -#ifdef __cplusplus - -#endif -}; - -/** - * @} - */ - -/* register this as object request broker structure */ -ORB_DECLARE(multirotor_motor_limits); From 1c3f860b2d140e1632257d9dd644327b9c659a61 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:36:07 +0200 Subject: [PATCH 08/12] uORB: Remove intermediate file --- src/modules/uORB/topics/safety.h | 71 -------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 src/modules/uORB/topics/safety.h diff --git a/src/modules/uORB/topics/safety.h b/src/modules/uORB/topics/safety.h deleted file mode 100644 index 7cb3219788..0000000000 --- a/src/modules/uORB/topics/safety.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * - * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/safety.msg */ - - -#pragma once - -#include -#include - - -#ifndef __cplusplus - -#endif - -/** - * @addtogroup topics - * @{ - */ - - -#ifdef __cplusplus -struct __EXPORT safety_s { -#else -struct safety_s { -#endif - uint64_t timestamp; - bool safety_switch_available; - bool safety_off; -#ifdef __cplusplus - -#endif -}; - -/** - * @} - */ - -/* register this as object request broker structure */ -ORB_DECLARE(safety); From 287e611cdb7d5512deb049161b420ae5ea538b9f Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:36:17 +0200 Subject: [PATCH 09/12] uORB: Remove intermediate file: sat info --- src/modules/uORB/topics/satellite_info.h | 77 ------------------------ 1 file changed, 77 deletions(-) delete mode 100644 src/modules/uORB/topics/satellite_info.h diff --git a/src/modules/uORB/topics/satellite_info.h b/src/modules/uORB/topics/satellite_info.h deleted file mode 100644 index fc06e89a6d..0000000000 --- a/src/modules/uORB/topics/satellite_info.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * - * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/satellite_info.msg */ - - -#pragma once - -#include -#include - - -#ifndef __cplusplus -#define SAT_INFO_MAX_SATELLITES 20 - -#endif - -/** - * @addtogroup topics - * @{ - */ - - -#ifdef __cplusplus -struct __EXPORT satellite_info_s { -#else -struct satellite_info_s { -#endif - uint64_t timestamp; - uint8_t count; - uint8_t svid[20]; - uint8_t used[20]; - uint8_t elevation[20]; - uint8_t azimuth[20]; - uint8_t snr[20]; -#ifdef __cplusplus - static const uint8_t SAT_INFO_MAX_SATELLITES = 20; - -#endif -}; - -/** - * @} - */ - -/* register this as object request broker structure */ -ORB_DECLARE(satellite_info); From bb1fef4454da021598f102be416f16efc0b7da6a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:36:36 +0200 Subject: [PATCH 10/12] uORB: Remove intermediate file: telemetry status --- src/modules/uORB/topics/telemetry_status.h | 89 ---------------------- 1 file changed, 89 deletions(-) delete mode 100644 src/modules/uORB/topics/telemetry_status.h diff --git a/src/modules/uORB/topics/telemetry_status.h b/src/modules/uORB/topics/telemetry_status.h deleted file mode 100644 index 1a38366e9e..0000000000 --- a/src/modules/uORB/topics/telemetry_status.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** - * - * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/telemetry_status.msg */ - - -#pragma once - -#include -#include - - -#ifndef __cplusplus -#define TELEMETRY_STATUS_RADIO_TYPE_GENERIC 0 -#define TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO 1 -#define TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET 2 -#define TELEMETRY_STATUS_RADIO_TYPE_WIRE 3 - -#endif - -/** - * @addtogroup topics - * @{ - */ - - -#ifdef __cplusplus -struct __EXPORT telemetry_status_s { -#else -struct telemetry_status_s { -#endif - uint64_t timestamp; - uint64_t heartbeat_time; - uint64_t telem_time; - uint8_t type; - uint8_t rssi; - uint8_t remote_rssi; - uint16_t rxerrors; - uint16_t fixed; - uint8_t noise; - uint8_t remote_noise; - uint8_t txbuf; - uint8_t system_id; - uint8_t component_id; -#ifdef __cplusplus - static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_GENERIC = 0; - static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO = 1; - static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_UBIQUITY_BULLET = 2; - static const uint8_t TELEMETRY_STATUS_RADIO_TYPE_WIRE = 3; - -#endif -}; - -/** - * @} - */ - -/* register this as object request broker structure */ -ORB_DECLARE(telemetry_status); From 9c76f4a3d7ea983d125a5a965ee412422148e57f Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 12 Jul 2015 12:38:52 +0200 Subject: [PATCH 11/12] Add safety topic --- msg/safety.msg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 msg/safety.msg diff --git a/msg/safety.msg b/msg/safety.msg new file mode 100644 index 0000000000..be0fadad1e --- /dev/null +++ b/msg/safety.msg @@ -0,0 +1,3 @@ +uint64 timestamp +bool safety_switch_available # Set to true if a safety switch is connected +bool safety_off # Set to true if safety is off From 69ce66a3f961e1ca1419631c0989c7998b2748b6 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 10 Aug 2015 15:49:38 +0200 Subject: [PATCH 12/12] MAVLink app: use struct-internal symbol for 3DR radio telemetry type --- src/modules/mavlink/mavlink_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index a39f33f9fb..75b60e1016 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -1361,7 +1361,7 @@ Mavlink::update_rate_mult() bool radio_found = false; /* 2nd pass: Now check hardware limits */ - if (tstatus.type == TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO) { + if (tstatus.type == telemetry_status_s::TELEMETRY_STATUS_RADIO_TYPE_3DR_RADIO) { radio_found = true;