mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-27 15:42:53 +00:00
Change variable names to something more meaningful
This commit is contained in:
parent
a30bf16abf
commit
6412bbc8d3
@ -520,22 +520,24 @@ void ControlThread::gps_acq_assist_data_collector()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ControlThread::sysv_queue_listener()
|
void ControlThread::sysv_queue_listener()
|
||||||
{
|
{
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long mtype; //required by sys v message
|
long mtype; // required by SysV queue messaging
|
||||||
double ttff;
|
double stop_message;
|
||||||
} ttff_msgbuf;
|
} stop_msgbuf;
|
||||||
|
|
||||||
bool read_queue = true;
|
bool read_queue = true;
|
||||||
ttff_msgbuf msg;
|
stop_msgbuf msg;
|
||||||
double ttff_msg = 0.0;
|
double received_message = 0.0;
|
||||||
int msgrcv_size = sizeof(msg.ttff);
|
int msgrcv_size = sizeof(msg.stop_message);
|
||||||
|
|
||||||
key_t key = 1102;
|
key_t key = 1102;
|
||||||
|
|
||||||
if((msqid = msgget(key, 0644 | IPC_CREAT )) == -1)
|
if((msqid = msgget(key, 0644 | IPC_CREAT )) == -1)
|
||||||
{
|
{
|
||||||
perror("msgget");
|
perror("GNSS-SDR cannot create SysV message queues");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,8 +545,8 @@ void ControlThread::sysv_queue_listener()
|
|||||||
{
|
{
|
||||||
if (msgrcv(msqid, &msg, msgrcv_size, 1, 0) != -1)
|
if (msgrcv(msqid, &msg, msgrcv_size, 1, 0) != -1)
|
||||||
{
|
{
|
||||||
ttff_msg = msg.ttff;
|
received_message = msg.stop_message;
|
||||||
if( (std::abs(ttff_msg - (-200.0)) < 10 * std::numeric_limits<double>::epsilon()) )
|
if( (std::abs(received_message - (-200.0)) < 10 * std::numeric_limits<double>::epsilon()) )
|
||||||
{
|
{
|
||||||
std::cout << "Quit order received, stopping GNSS-SDR !!" << std::endl;
|
std::cout << "Quit order received, stopping GNSS-SDR !!" << std::endl;
|
||||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user