Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#38 closed defect (fixed)

bnc --key onTheFlyInterval "": seems to be ignored

Reported by: fgnievinski@… Owned by: stuerze
Priority: normal Component: BNC
Version: Keywords:
Cc:

Description

I'm trying to make the command line input override the configuration file with regard to the onTheFlyInterval setting. The config file has onTheFlyInterval=1 day while at the prompt I'm calling bnc -nw --key onTheFlyInterval "".

I faced this problem using bnc to convert ntrip to rinex. Files were no longer being saved to disk after midnight UTC. I could get the intended behavior (files being saved uninterruptedly across day boundaries) changing the original setting onTheFlyInterval=1 day to onTheFlyInterval= in the config file. I could NOT get the intended behavior having onTheFlyInterval=1 day in the config file and bnc -nw --key onTheFlyInterval "" in the command line. It seems that the empty value "" is being ignored by bnc or perhaps even discarded by the shell itself.

Attachments (0)

Change History (6)

comment:1 by fgnievinski@…, 9 years ago

bnc --key onTheFlyInterval 0: seems to be honoured properly.

comment:2 by fgnievinski@…, 9 years ago

I found this in source file bnccaster.cpp:

if (settings.value("onTheFlyInterval").toString() == "1 min") {

_confInterval = 60;
nextShotTime = QTime(currTime.hour(), currTime.minute()+1, 0);

}
else if (settings.value("onTheFlyInterval").toString() == "5 min") {

_confInterval = 300;
nextShotTime = QTime(currTime.hour(), currTime.minute()+5, 0);

}
else if (settings.value("onTheFlyInterval").toString() == "1 hour") {

_confInterval = 3600;
nextShotTime = QTime(currTime.hour()+1, 0, 0);

}
else {

_confInterval = 86400;
nextShotTime = QTime(23, 59, 59, 999);

}

and this in source file bncwindow.cpp:

_onTheFlyComboBox->addItems(QString("1 day,1 hour,5 min,1 min").split(","));

Therefore I conclude that onTheFlyInterval only accepts 1 day, 1 hour, 5 min, 1 min. It'd be nice if bnc would throw an error for any other input value instead of silently defaulting to 1 day. Maybe also mention the valid input in the documentation.

Without the ability to disable configuration reset (i.e., infinite onTheFlyInterval), I don't see much point in the command line key input, as, e.g., this will fail at the earliest day boundary:

./bnc --nw --conf BNC.bnc --key rnxPath "/dados/ntrip/" --key rnxIntr "1 hour"

comment:3 by stoecker, 9 years ago

Owner: changed from mervart to stuerze
Status: newassigned

comment:4 by stuerze, 9 years ago

Allowed values for the option 'onTheFlyInterval' are: '1 min', '5 min', '1 hour' and '1 day'.
And the default value is '1 day'. From my point of view that's OK and, to set the 'onTheFlyInterval' to an empty value doesn't make sense.

Regards, Andrea.

comment:5 by stuerze, 9 years ago

Resolution: fixed
Status: assignedclosed

comment:6 by fgnievinski@…, 9 years ago

I'm not sure what's the point of offering command like key inputs if they will get overridden by the config file settings at the upcoming on-the-fly intervals; I was hoping that setting an infinite value to onTheFlyInterval would allow disabling configuration reset. Also, it'd be nice if bnc would throw an error for any other input value instead of silently defaulting to 1 day. Thanks.

Modify Ticket

Change Properties
Action
as closed The owner will remain stuerze.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.