fix: disable device test for network device as default.
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ void define_args()
|
||||
"\tebus device (serial or network) [/dev/ttyUSB0]");
|
||||
|
||||
A.addOption("nodevicecheck", "n", OptVal(false), dt_bool, ot_none,
|
||||
"disable valid ebus device test\n");
|
||||
"disable test of local ebus device\n");
|
||||
|
||||
A.addOption("acquiretimeout", "", OptVal(9400), dt_long, ot_mandatory,
|
||||
"bus acquisition timeout in 'us' [9400]");
|
||||
|
||||
@@ -245,9 +245,10 @@ Port::Port(const string deviceName, const bool noDeviceCheck,
|
||||
{
|
||||
m_device = NULL;
|
||||
|
||||
if (strchr(deviceName.c_str(), '/') == NULL &&
|
||||
strchr(deviceName.c_str(), ':') != NULL)
|
||||
if (strchr(deviceName.c_str(), '/') == NULL && strchr(deviceName.c_str(), ':') != NULL) {
|
||||
setType(dt_network);
|
||||
m_noDeviceCheck = true;
|
||||
}
|
||||
else
|
||||
setType(dt_serial);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user