Added support for CAN FD frames to the SERIALBUS

This commit is contained in:
Bohdan Buinich
2022-10-11 22:18:58 +03:00
parent 677d9ba9f8
commit 2c82535ca7
5 changed files with 42 additions and 8 deletions
+2
View File
@@ -47,6 +47,7 @@ void SerialBusConnection::piStarted()
mTimer.setSingleShot(false); //keep ticking
mTimer.start();
mBusData[0].mBus.setActive(true);
mBusData[0].mBus.setCanFD(false);
mBusData[0].mConfigured = true;
}
@@ -103,6 +104,7 @@ void SerialBusConnection::piSetBusSettings(int pBusIdx, CANBus bus)
//You cannot set the speed of a socketcan interface, it has to be set with console commands.
//But, you can probabaly set the speed of many of the other serialbus devices so go ahead and try
mDev_p->setConfigurationParameter(QCanBusDevice::BitRateKey, bus.speed);
mDev_p->setConfigurationParameter(QCanBusDevice::CanFdKey, bus.canFD);
/* connect device */
if (!mDev_p->connectDevice()) {