mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-31 23:26:22 +00:00
Fix potenctial data race condition
This commit is contained in:
parent
a152226f50
commit
15ddddf7c5
@ -537,6 +537,13 @@ void gps_l1_ca_telemetry_decoder_gs::frame_synchronization(const Gnss_Synchro &c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool gps_l1_ca_telemetry_decoder_gs::is_PLL_180_deg_phase_locked()
|
||||||
|
{
|
||||||
|
gr::thread::scoped_lock lock(d_setlock);
|
||||||
|
return d_flag_PLL_180_deg_phase_locked;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||||
{
|
{
|
||||||
@ -613,7 +620,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__
|
|||||||
d_nav_msg_packet.nav_message = "";
|
d_nav_msg_packet.nav_message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d_flag_PLL_180_deg_phase_locked == true)
|
if (is_PLL_180_deg_phase_locked())
|
||||||
{
|
{
|
||||||
// correct the accumulated phase for the Costas loop phase shift, if required
|
// correct the accumulated phase for the Costas loop phase shift, if required
|
||||||
current_symbol.Carrier_phase_rads += GNSS_PI;
|
current_symbol.Carrier_phase_rads += GNSS_PI;
|
||||||
|
@ -75,6 +75,7 @@ private:
|
|||||||
|
|
||||||
void check_tlm_separation();
|
void check_tlm_separation();
|
||||||
void frame_synchronization(const Gnss_Synchro ¤t_gs);
|
void frame_synchronization(const Gnss_Synchro ¤t_gs);
|
||||||
|
bool is_PLL_180_deg_phase_locked();
|
||||||
bool gps_word_parityCheck(uint32_t gpsword);
|
bool gps_word_parityCheck(uint32_t gpsword);
|
||||||
bool decode_subframe(double cn0, bool flag_invert);
|
bool decode_subframe(double cn0, bool flag_invert);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user