LAWICEL CAN-FD support, CAN-FD data rate selection

This commit is contained in:
maciek16c
2023-11-22 14:39:36 +01:00
parent 7fef6eb49f
commit 190d51ae90
23 changed files with 354 additions and 118 deletions
+2 -5
View File
@@ -6,11 +6,10 @@
#include "socketcand.h"
#include "lawicel_serial.h"
#include "canserver.h"
#include "canlogserver.h"
using namespace CANCon;
CANConnection* CanConFactory::create(type pType, QString pPortName, QString pDriverName, int pSerialSpeed, int pBusSpeed)
CANConnection* CanConFactory::create(type pType, QString pPortName, QString pDriverName, int pSerialSpeed, int pBusSpeed, bool pCanFd, int pDataRate)
{
switch(pType) {
case SERIALBUS:
@@ -23,15 +22,13 @@ CANConnection* CanConFactory::create(type pType, QString pPortName, QString pDri
case REMOTE:
return new GVRetSerial(pPortName, true); //it's a special case of GVRET connected over TCP/IP so it uses the same class
case LAWICEL:
return new LAWICELSerial(pPortName, pSerialSpeed, pBusSpeed);
return new LAWICELSerial(pPortName, pSerialSpeed, pBusSpeed, pCanFd, pDataRate);
case KAYAK:
return new SocketCANd(pPortName);
case MQTT:
return new MQTT_BUS(pPortName);
case CANSERVER:
return new CANserver(pPortName);
case CANLOGSERVER:
return new CanLogServer(pPortName);
default: {}
}