From d4db8a82b70c0cbc8a9a0bf84b8f59fd5f185f55 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 20 Nov 2021 03:58:56 +0100 Subject: [PATCH] Fix formatting, print HAS message decoding only when we already have the mask and can be read --- src/core/libs/galileo_e6_has_msg_receiver.cc | 4 ++-- src/core/libs/galileo_e6_has_msg_receiver.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/libs/galileo_e6_has_msg_receiver.cc b/src/core/libs/galileo_e6_has_msg_receiver.cc index 3e0b39356..8fae7611e 100644 --- a/src/core/libs/galileo_e6_has_msg_receiver.cc +++ b/src/core/libs/galileo_e6_has_msg_receiver.cc @@ -225,12 +225,12 @@ void galileo_e6_has_msg_receiver::process_HAS_page(const Galileo_HAS_page& has_p if (res == 0) { // Successful decoding, we have a valid HAS message stored at d_HAS_data - std::cout << TEXT_MAGENTA << "New Galileo HAS message type " << std::to_string(has_page.message_id) - << " received and successfully decoded" << TEXT_RESET << '\n'; if (d_nsat_in_mask_id[d_HAS_data.header.mask_id] != 0) { // if we have the mask for that message, it's ready to be sent to PVT d_new_message = true; + std::cout << TEXT_MAGENTA << "New Galileo HAS message ID " << std::to_string(has_page.message_id) + << " received and successfully decoded" << TEXT_RESET << '\n'; } } } diff --git a/src/core/libs/galileo_e6_has_msg_receiver.h b/src/core/libs/galileo_e6_has_msg_receiver.h index 6c9d6c1b9..da90593c6 100644 --- a/src/core/libs/galileo_e6_has_msg_receiver.h +++ b/src/core/libs/galileo_e6_has_msg_receiver.h @@ -57,7 +57,7 @@ class galileo_e6_has_msg_receiver : public gr::block public: ~galileo_e6_has_msg_receiver() = default; //!< Default destructor void set_enable_navdata_monitor(bool enable); - std::shared_ptr process_test_page(const pmt::pmt_t& msg); //!< For testing purposes only + std::shared_ptr process_test_page(const pmt::pmt_t& msg); //!< For testing purposes only private: friend galileo_e6_has_msg_receiver_sptr galileo_e6_has_msg_receiver_make();