Implemented connection save with speeds and can fd at least for bus 0.

This commit is contained in:
werner
2025-02-13 20:21:15 +01:00
parent cccdad4b76
commit 60b0e65a18
6 changed files with 44 additions and 11 deletions
+11 -2
View File
@@ -41,8 +41,13 @@ CANConnection::CANConnection(QString pPort,
if (pBusSpeed > 0) mBusData[0].mBus.setSpeed(pBusSpeed);
mBusData[0].mBus.setCanFD(pCanFd);
if (pDataRate > 0) mBusData[0].mBus.setDataRate(pDataRate);
if (pDataRate > 0) {
mBusData[0].mBus.setDataRate(pDataRate);
if (pCanFd) {
mBusData[0].mBus.setCanFD(pCanFd);
}
}
/* if needed, create a thread and move ourself into it */
if(pUseThread) {
mThread_p = new QThread();
@@ -210,6 +215,10 @@ int CANConnection::getNumBuses() const{
return mNumBuses;
}
int CANConnection::getSerialSpeed() const{
return mSerialSpeed;
}
bool CANConnection::isConfigured(int pBusId) {
if( pBusId < 0 || pBusId >= getNumBuses())