mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-21 06:27:01 +00:00
Improve readability
This commit is contained in:
parent
e74b72b9df
commit
471bb17b3c
@ -33,6 +33,7 @@
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
ChannelFsm::ChannelFsm()
|
||||
{
|
||||
@ -135,35 +136,41 @@ bool ChannelFsm::Event_failed_tracking_standby()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
acq_ = acquisition;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
trk_ = tracking;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
queue_ = queue;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::set_channel(unsigned int channel)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx);
|
||||
channel_ = channel;
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::start_acquisition()
|
||||
{
|
||||
acq_->reset();
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::start_tracking()
|
||||
{
|
||||
trk_->start_tracking();
|
||||
@ -174,6 +181,7 @@ void ChannelFsm::start_tracking()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::request_satellite()
|
||||
{
|
||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||
@ -183,6 +191,7 @@ void ChannelFsm::request_satellite()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ChannelFsm::notify_stop_tracking()
|
||||
{
|
||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||
|
@ -42,6 +42,7 @@ channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<Channe
|
||||
return channel_msg_receiver_cc_sptr(new channel_msg_receiver_cc(channel_fsm, repeat));
|
||||
}
|
||||
|
||||
|
||||
void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
bool result = false;
|
||||
@ -50,10 +51,10 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
|
||||
long int message = pmt::to_long(msg);
|
||||
switch (message)
|
||||
{
|
||||
case 1: //positive acquisition
|
||||
case 1: // positive acquisition
|
||||
result = d_channel_fsm->Event_valid_acquisition();
|
||||
break;
|
||||
case 2: //negative acquisition
|
||||
case 2: // negative acquisition
|
||||
if (d_repeat == true)
|
||||
{
|
||||
result = d_channel_fsm->Event_failed_acquisition_repeat();
|
||||
|
@ -37,12 +37,15 @@ using google::LogMessage;
|
||||
|
||||
// Constructor
|
||||
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res,
|
||||
std::string role,
|
||||
std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
{
|
||||
connected_ = false;
|
||||
if (configuration)
|
||||
|
@ -37,12 +37,15 @@ using google::LogMessage;
|
||||
|
||||
// Constructor
|
||||
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||
std::shared_ptr<GNSSBlockInterface> res,
|
||||
std::string role,
|
||||
std::string implementation) : data_type_adapt_(data_type_adapt),
|
||||
in_filt_(in_filt),
|
||||
res_(res),
|
||||
role_(role),
|
||||
implementation_(implementation)
|
||||
{
|
||||
connected_ = false;
|
||||
if (configuration)
|
||||
@ -101,6 +104,7 @@ gr::basic_block_sptr SignalConditioner::get_left_block()
|
||||
return data_type_adapt_->get_left_block();
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr SignalConditioner::get_right_block()
|
||||
{
|
||||
return res_->get_right_block();
|
||||
|
Loading…
Reference in New Issue
Block a user