diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2020-06-12 09:42:48 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2020-06-12 09:42:48 +0200 |
commit | a733079f1e618ec4a3411e39ebdaeac10614b0ff (patch) | |
tree | 4b3158be4d47408987cdec6b3ca53e2e143c91f7 | |
parent | 74f2537d56f7e957a9462247f634c5288a39e985 (diff) | |
parent | c12af8832389785b8be7ffcdddcdb8480c1e124d (diff) |
Merge remote-tracking branch 'gerrit/5.15' into dev
Change-Id: I5514315b4a8e45c968f874216cdec8f13582a647
-rw-r--r-- | dist/changes-5.14.2 | 24 | ||||
-rw-r--r-- | dist/changes-5.15.0 | 36 | ||||
-rw-r--r-- | src/plugins/canbus/socketcan/socketcanbackend.cpp | 27 | ||||
-rw-r--r-- | src/plugins/canbus/socketcan/socketcanbackend.h | 24 | ||||
-rw-r--r-- | src/plugins/canbus/virtualcan/virtualcanbackend.cpp | 1 |
5 files changed, 88 insertions, 24 deletions
diff --git a/dist/changes-5.14.2 b/dist/changes-5.14.2 new file mode 100644 index 0000000..85c9b09 --- /dev/null +++ b/dist/changes-5.14.2 @@ -0,0 +1,24 @@ +Qt 5.14.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.14.0 through 5.14.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.14 series is binary compatible with the 5.13.x series. +Applications compiled for 5.13 will continue to run with 5.14. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.14.2 Changes * +**************************************************************************** + + - Fixed a crash in CAN-Example when opening the CAN bus device failed. diff --git a/dist/changes-5.15.0 b/dist/changes-5.15.0 new file mode 100644 index 0000000..e034ded --- /dev/null +++ b/dist/changes-5.15.0 @@ -0,0 +1,36 @@ +Qt 5.15 introduces many new features and improvements as well as bugfixes +over the 5.14.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.15 series is binary compatible with the 5.14.x series. +Applications compiled for 5.14 will continue to run with 5.15. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* SocketCAN * +**************************************************************************** + + - QCanBusDevice::hasBusStatus() now returns false for virtual CAN devices. + - [QTBUG-82814] Fixed compiliation with old Linux Kernels. + +**************************************************************************** +* VectorCAN * +**************************************************************************** + + - Added CAN FD support to the VectorCAN plugin. + +**************************************************************************** +* VirtualCAN * +**************************************************************************** + + - Added the missing emission of the framesWritten() signal to + writeFrame(). diff --git a/src/plugins/canbus/socketcan/socketcanbackend.cpp b/src/plugins/canbus/socketcan/socketcanbackend.cpp index e38e187..572fef8 100644 --- a/src/plugins/canbus/socketcan/socketcanbackend.cpp +++ b/src/plugins/canbus/socketcan/socketcanbackend.cpp @@ -56,30 +56,6 @@ #include <sys/ioctl.h> #include <sys/time.h> -#ifndef CANFD_MTU -// CAN FD support was added by Linux kernel 3.6 -// For prior kernels we redefine the missing defines here -// they are taken from linux/can/raw.h & linux/can.h - -enum { - CAN_RAW_FD_FRAMES = 5 -}; - -#define CAN_MAX_DLEN 8 -#define CANFD_MAX_DLEN 64 -struct canfd_frame { - canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ - __u8 len; /* frame payload length in byte */ - __u8 flags; /* additional flags for CAN FD */ - __u8 __res0; /* reserved / padding */ - __u8 __res1; /* reserved / padding */ - __u8 data[CANFD_MAX_DLEN] __attribute__((aligned(8))); -}; -#define CAN_MTU (sizeof(struct can_frame)) -#define CANFD_MTU (sizeof(struct canfd_frame)) - -#endif - #ifndef CANFD_BRS # define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ #endif @@ -776,6 +752,9 @@ void SocketCanBackend::resetController() bool SocketCanBackend::hasBusStatus() const { + if (isVirtual(canSocketName.toLatin1())) + return false; + return libSocketCan->hasBusStatus(); } diff --git a/src/plugins/canbus/socketcan/socketcanbackend.h b/src/plugins/canbus/socketcan/socketcanbackend.h index 0497244..b6cb5ef 100644 --- a/src/plugins/canbus/socketcan/socketcanbackend.h +++ b/src/plugins/canbus/socketcan/socketcanbackend.h @@ -54,6 +54,30 @@ #include <memory> +#ifndef CANFD_MTU +// CAN FD support was added by Linux kernel 3.6 +// For prior kernels we redefine the missing defines here +// they are taken from linux/can/raw.h & linux/can.h + +enum { + CAN_RAW_FD_FRAMES = 5 +}; + +#define CAN_MAX_DLEN 8 +#define CANFD_MAX_DLEN 64 +struct canfd_frame { + canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ + __u8 len; /* frame payload length in byte */ + __u8 flags; /* additional flags for CAN FD */ + __u8 __res0; /* reserved / padding */ + __u8 __res1; /* reserved / padding */ + __u8 data[CANFD_MAX_DLEN] __attribute__((aligned(8))); +}; +#define CAN_MTU (sizeof(struct can_frame)) +#define CANFD_MTU (sizeof(struct canfd_frame)) + +#endif + QT_BEGIN_NAMESPACE class LibSocketCan; diff --git a/src/plugins/canbus/virtualcan/virtualcanbackend.cpp b/src/plugins/canbus/virtualcan/virtualcanbackend.cpp index a7e23ff..ce1ca3e 100644 --- a/src/plugins/canbus/virtualcan/virtualcanbackend.cpp +++ b/src/plugins/canbus/virtualcan/virtualcanbackend.cpp @@ -290,6 +290,7 @@ bool VirtualCanBackend::writeFrame(const QCanBusFrame &frame) enqueueReceivedFrames({echoFrame}); } + emit framesWritten(qint64(1)); return true; } |