From 64220d613a822866fd715e63e5c7c55d8e27bf3f Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Thu, 5 Jan 2023 20:31:10 -0500 Subject: [PATCH] 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. --- .gitignore | 1 + connections/canconfactory.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1d11c8e..fd8a706 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ Makefile # Editor files *.code-workspace +SavvyCAN.pro.qtds diff --git a/connections/canconfactory.cpp b/connections/canconfactory.cpp index 43264dd..9ff5bd8 100644 --- a/connections/canconfactory.cpp +++ b/connections/canconfactory.cpp @@ -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);