mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Merge branch 'fix-asan' into next
This commit is contained in:
commit
2e09b03174
@ -60,6 +60,8 @@ DEFINE_string(RINEX_version, "-", "If defined, specifies the RINEX version (2.11
|
||||
|
||||
DEFINE_string(RINEX_name, "-", "If defined, specifies the RINEX files base name");
|
||||
|
||||
DEFINE_bool(keyboard, true, "If set to false, it disables the keyboard listener (so the receiver cannot be stopped with [Enter]+q)");
|
||||
|
||||
#if GFLAGS_GREATER_2_0
|
||||
|
||||
static bool ValidateC(const char* flagname, const std::string& value)
|
||||
|
@ -59,7 +59,7 @@ const int32_t DEFAULT_CARRIER_SMOOTHING_FACTOR = 200;
|
||||
// Declare flags for PVT
|
||||
DECLARE_string(RINEX_version); //!< If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.
|
||||
DECLARE_string(RINEX_name); //!< If defined, specifies the RINEX files base name
|
||||
|
||||
DECLARE_bool(keyboard); //!< If set to false, disables the keyboard listener. Only for debug purposes (e.g. ASAN mode termination)
|
||||
|
||||
/** \} */
|
||||
/** \} */
|
||||
|
@ -369,7 +369,10 @@ int ControlThread::run()
|
||||
// launch GNSS assistance process AFTER the flowgraph is running because the GNU Radio asynchronous queues must be already running to transport msgs
|
||||
assist_GNSS();
|
||||
// start the keyboard_listener thread
|
||||
if (FLAGS_keyboard)
|
||||
{
|
||||
keyboard_thread_ = std::thread(&ControlThread::keyboard_listener, this);
|
||||
}
|
||||
sysv_queue_thread_ = std::thread(&ControlThread::sysv_queue_listener, this);
|
||||
|
||||
// start the telecommand listener thread
|
||||
@ -405,7 +408,7 @@ int ControlThread::run()
|
||||
#endif
|
||||
|
||||
// Terminate keyboard thread
|
||||
if (keyboard_thread_.joinable())
|
||||
if (FLAGS_keyboard && keyboard_thread_.joinable())
|
||||
{
|
||||
pthread_t id = keyboard_thread_.native_handle();
|
||||
keyboard_thread_.detach();
|
||||
|
Loading…
Reference in New Issue
Block a user