Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98800

[PeakCAN] Incorrect QCanBusFrame::TimeStamp conversion

    XMLWordPrintable

Details

    • All
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aha_1980 André Hartmann
            pstadelmann Patrick Stadelmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes