Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.3, 6.2, 6.3.0 Alpha, 6.3
-
5.14.2, 6.2.1
-
None
-
-
00be76c217fa266ca6070e5975236cb789fe9ec2 (qt/qtserialbus/dev) ad1c68dfe265114fe071448dbfd787710df646b0 (qt/qtserialbus/6.2)
Description
The timestamp computation in "peakcanbackend.cpp" is incorrect. The code used is:
const quint64 millis = timestamp.millis + Q_UINT64_C(0xFFFFFFFF) * timestamp.millis_overflow;
Link : 774
timestamp.millis_overflow represents the number of time the 32-bit counter rolled over, and must therefore be multiplied by 0x100000000 (i.e. 0xFFFFFFFF+1).
As a result of the bug, the timestamp is timestamp.millis_overflow ms too far in the past. This value is currently 381, and when comparing the timestamp with the system clock, the difference is indeed larger than 381 ms, whereas one would expect a much lower difference.
Attachments
For Gerrit Dashboard: QTBUG-98800 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
383944,2 | PeakCAN: Fix CAN 2.0 timestamp calculation | dev | qt/qtserialbus | Status: MERGED | +2 | 0 |
384672,2 | PeakCAN: Fix CAN 2.0 timestamp calculation | 6.2 | qt/qtserialbus | Status: MERGED | +2 | 0 |