#38 closed defect (fixed)
bnc --key onTheFlyInterval "": seems to be ignored
Reported by: | 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 , 9 years ago
comment:2 by , 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 , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 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 , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 by , 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.
bnc --key onTheFlyInterval 0: seems to be honoured properly.