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:
Collin Kidder
2023-01-05 20:31:10 -05:00
parent fa57b3ec55
commit 64220d613a
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -42,3 +42,4 @@ Makefile
# Editor files
*.code-workspace
SavvyCAN.pro.qtds
+1 -1
View File
@@ -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);