Fix formatting, print HAS message decoding only when we already have the mask and can be read

This commit is contained in:
Carles Fernandez 2021-11-20 03:58:56 +01:00
parent 98a850053c
commit d4db8a82b7
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 3 additions and 3 deletions

View File

@ -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';
}
}
}

View File

@ -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<Galileo_HAS_data> process_test_page(const pmt::pmt_t& msg); //!< For testing purposes only
std::shared_ptr<Galileo_HAS_data> 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();