1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-06-27 15:42:53 +00:00

Improve readability

This commit is contained in:
Carles Fernandez 2018-04-29 10:23:19 +02:00
parent e74b72b9df
commit 471bb17b3c
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 31 additions and 14 deletions

View File

@ -33,6 +33,7 @@
#include "control_message_factory.h" #include "control_message_factory.h"
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage;
ChannelFsm::ChannelFsm() ChannelFsm::ChannelFsm()
{ {
@ -135,35 +136,41 @@ bool ChannelFsm::Event_failed_tracking_standby()
} }
} }
void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition) void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition)
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);
acq_ = acquisition; acq_ = acquisition;
} }
void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking) void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking)
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);
trk_ = tracking; trk_ = tracking;
} }
void ChannelFsm::set_queue(gr::msg_queue::sptr queue) void ChannelFsm::set_queue(gr::msg_queue::sptr queue)
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);
queue_ = queue; queue_ = queue;
} }
void ChannelFsm::set_channel(unsigned int channel) void ChannelFsm::set_channel(unsigned int channel)
{ {
std::lock_guard<std::mutex> lk(mx); std::lock_guard<std::mutex> lk(mx);
channel_ = channel; channel_ = channel;
} }
void ChannelFsm::start_acquisition() void ChannelFsm::start_acquisition()
{ {
acq_->reset(); acq_->reset();
} }
void ChannelFsm::start_tracking() void ChannelFsm::start_tracking()
{ {
trk_->start_tracking(); trk_->start_tracking();
@ -174,6 +181,7 @@ void ChannelFsm::start_tracking()
} }
} }
void ChannelFsm::request_satellite() void ChannelFsm::request_satellite()
{ {
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
@ -183,6 +191,7 @@ void ChannelFsm::request_satellite()
} }
} }
void ChannelFsm::notify_stop_tracking() void ChannelFsm::notify_stop_tracking()
{ {
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());

View File

@ -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)); 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) void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
{ {
bool result = false; bool result = false;

View File

@ -37,8 +37,11 @@ using google::LogMessage;
// Constructor // Constructor
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration, ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> data_type_adapt,
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(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), in_filt_(in_filt),
res_(res), res_(res),
role_(role), role_(role),

View File

@ -37,8 +37,11 @@ using google::LogMessage;
// Constructor // Constructor
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration, SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> data_type_adapt,
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(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), in_filt_(in_filt),
res_(res), res_(res),
role_(role), role_(role),
@ -101,6 +104,7 @@ gr::basic_block_sptr SignalConditioner::get_left_block()
return data_type_adapt_->get_left_block(); return data_type_adapt_->get_left_block();
} }
gr::basic_block_sptr SignalConditioner::get_right_block() gr::basic_block_sptr SignalConditioner::get_right_block()
{ {
return res_->get_right_block(); return res_->get_right_block();