From 5fa1e8e8badf120fe8453906d702368be071ce0c Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 10 Oct 2020 19:06:45 -0400 Subject: [PATCH] mavlink: stream rename GROUND_TRUTH -> HIL_STATE_QUATERNION --- src/modules/mavlink/mavlink_main.cpp | 6 +++--- src/modules/mavlink/mavlink_messages.cpp | 8 ++++---- .../{GROUND_TRUTH.hpp => HIL_STATE_QUATERNION.hpp} | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) rename src/modules/mavlink/streams/{GROUND_TRUTH.hpp => HIL_STATE_QUATERNION.hpp} (91%) diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 483a6f112b..505bc8745d 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -722,10 +722,10 @@ Mavlink::set_hil_enabled(bool hil_enabled) ret = configure_stream("HIL_ACTUATOR_CONTROLS", 200.0f); if (_param_sys_hitl.get() == 2) { // Simulation in Hardware enabled ? - configure_stream("GROUND_TRUTH", 25.0f); // HIL_STATE_QUATERNION to display the SIH + configure_stream("HIL_STATE_QUATERNION", 25.0f); // ground truth to display the SIH } else { - configure_stream("GROUND_TRUTH", 0.0f); + configure_stream("HIL_STATE_QUATERNION", 0.0f); } } @@ -734,7 +734,7 @@ Mavlink::set_hil_enabled(bool hil_enabled) _hil_enabled = false; ret = configure_stream("HIL_ACTUATOR_CONTROLS", 0.0f); - configure_stream("GROUND_TRUTH", 0.0f); + configure_stream("HIL_STATE_QUATERNION", 0.0f); } return ret; diff --git a/src/modules/mavlink/mavlink_messages.cpp b/src/modules/mavlink/mavlink_messages.cpp index 919ee90a6b..d18b681507 100644 --- a/src/modules/mavlink/mavlink_messages.cpp +++ b/src/modules/mavlink/mavlink_messages.cpp @@ -118,8 +118,8 @@ using matrix::wrap_2pi; #include "streams/ESC_STATUS.hpp" #include "streams/EXTENDED_SYS_STATE.hpp" #include "streams/FLIGHT_INFORMATION.hpp" -#include "streams/GROUND_TRUTH.hpp" #include "streams/HIGH_LATENCY2.hpp" +#include "streams/HIL_STATE_QUATERNION.hpp" #include "streams/OBSTACLE_DISTANCE.hpp" #include "streams/ORBIT_EXECUTION_STATUS.hpp" #include "streams/PING.hpp" @@ -4994,9 +4994,9 @@ static const StreamListItem streams_list[] = { #if defined(HIGH_LATENCY2_HPP) create_stream_list_item(), #endif // HIGH_LATENCY2_HPP -#if defined(GROUND_TRUTH_HPP) - create_stream_list_item(), -#endif // GROUND_TRUTH_HPP +#if defined(HIL_STATE_QUATERNION_HPP) + create_stream_list_item(), +#endif // HIL_STATE_QUATERNION_HPP #if defined(PING_HPP) create_stream_list_item(), #endif // PING_HPP diff --git a/src/modules/mavlink/streams/GROUND_TRUTH.hpp b/src/modules/mavlink/streams/HIL_STATE_QUATERNION.hpp similarity index 91% rename from src/modules/mavlink/streams/GROUND_TRUTH.hpp rename to src/modules/mavlink/streams/HIL_STATE_QUATERNION.hpp index 78d6362f1b..b2dcb5c426 100644 --- a/src/modules/mavlink/streams/GROUND_TRUTH.hpp +++ b/src/modules/mavlink/streams/HIL_STATE_QUATERNION.hpp @@ -31,15 +31,15 @@ * ****************************************************************************/ -#ifndef GROUND_TRUTH_HPP -#define GROUND_TRUTH_HPP +#ifndef HIL_STATE_QUATERNION_HPP +#define HIL_STATE_QUATERNION_HPP -class MavlinkStreamGroundTruth : public MavlinkStream +class MavlinkStreamHILStateQuaternion : public MavlinkStream { public: - static MavlinkStream *new_instance(Mavlink *mavlink) { return new MavlinkStreamGroundTruth(mavlink); } + static MavlinkStream *new_instance(Mavlink *mavlink) { return new MavlinkStreamHILStateQuaternion(mavlink); } - static constexpr const char *get_name_static() { return "GROUND_TRUTH"; } + static constexpr const char *get_name_static() { return "HIL_STATE_QUATERNION"; } static constexpr uint16_t get_id_static() { return MAVLINK_MSG_ID_HIL_STATE_QUATERNION; } const char *get_name() const override { return get_name_static(); } @@ -55,7 +55,7 @@ public: } private: - explicit MavlinkStreamGroundTruth(Mavlink *mavlink) : MavlinkStream(mavlink) {} + explicit MavlinkStreamHILStateQuaternion(Mavlink *mavlink) : MavlinkStream(mavlink) {} uORB::Subscription _angular_velocity_sub{ORB_ID(vehicle_angular_velocity_groundtruth)}; uORB::Subscription _att_sub{ORB_ID(vehicle_attitude_groundtruth)}; @@ -111,4 +111,4 @@ private: } }; -#endif // GROUND_TRUTH_HPP +#endif // HIL_STATE_QUATERNION_HPP