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
+12 -1
View File
@@ -9,6 +9,7 @@ CANBus::CANBus()
singleWire = false;
active = false;
canFD = false;
dataRate = 2000000;
}
@@ -17,7 +18,8 @@ CANBus::CANBus(const CANBus& pBus) :
listenOnly(pBus.listenOnly),
singleWire(pBus.singleWire),
active(pBus.active),
canFD(pBus.canFD) {}
canFD(pBus.canFD),
dataRate(pBus.dataRate){}
bool CANBus::operator==(const CANBus& bus) const{
@@ -57,6 +59,15 @@ int CANBus::getSpeed(){
return speed;
}
int CANBus::getDataRate(){
return dataRate;
}
void CANBus::setDataRate(int newSpeed){
//qDebug() << "CANBUS SetSpeed = " << newSpeed;
dataRate = newSpeed;
}
bool CANBus::isListenOnly(){
return listenOnly;
}