Fix for MacOS and GVRET Serial Devices
A previous commit caused any device with a . in the name to be treated as a network device. This is not correct as MacOS will name many usb serial devices with dots in the name. Hopefully this makes the behavior correct in all cases now.
This commit is contained in:
@@ -42,3 +42,4 @@ Makefile
|
||||
|
||||
# Editor files
|
||||
*.code-workspace
|
||||
SavvyCAN.pro.qtds
|
||||
|
||||
@@ -14,7 +14,7 @@ CANConnection* CanConFactory::create(type pType, QString pPortName, QString pDri
|
||||
case SERIALBUS:
|
||||
return new SerialBusConnection(pPortName, pDriverName);
|
||||
case GVRET_SERIAL:
|
||||
if(pPortName.contains("."))
|
||||
if(pPortName.contains(".") && !pPortName.contains("tty"))
|
||||
return new GVRetSerial(pPortName, true);
|
||||
else
|
||||
return new GVRetSerial(pPortName, false);
|
||||
|
||||
Reference in New Issue
Block a user