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
+5 -1
View File
@@ -19,7 +19,7 @@ class LAWICELSerial : public CANConnection
Q_OBJECT
public:
LAWICELSerial(QString portName, int serialSpeed, int lawicelSpeed);
LAWICELSerial(QString portName, int serialSpeed, int lawicelSpeed, bool canFd, int dataRate);
virtual ~LAWICELSerial();
protected:
@@ -49,6 +49,8 @@ private:
void rebuildLocalTimeBasis();
void sendToSerial(const QByteArray &bytes);
void sendDebug(const QString debugText);
uint8_t dlc_code_to_bytes(int dlc_code);
uint8_t bytes_to_dlc_code(uint8_t bytes);
protected:
QTimer mTimer;
@@ -61,6 +63,8 @@ protected:
CANFrame buildFrame;
bool can0Enabled;
bool can0ListenOnly;
bool canFd;
int dataRate;
};
#endif // LAWICELSERIAL_H