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

passthrucanio.h pollTimeout is not adjustable / value is too high

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.13.2
    • SerialBus: CAN Bus
    • None
    • All

    Description

      In implemented a CANBus Logger (and subsequently a test app) I found the following:

      In reading any ODB-II mode 1 pid, I was seeing the following timing with a slight variation (~10ms) per test.

      1. Call writeFrame (just puts the message into a send queue) : 0 ms
      2. Receive framesWritten signal (indicates message has actually been sent) : 98 ms
      3. Receive framesReceived signal (see echo of sent message and reply): 213 ms

      This timing works great for reading a non-realtime value such as "Fuel Type (0x51)" but is drastically too slow to do anything real-time "Engine RPM (0x0C)".

      Ultimately I rebuilt the Qt source after editing the pollTimeout in qt5/qtserialbus/src/plugins/canbus/passthrucan/passthrucanio.h and setting it to 1ms (it was 100ms), I able to get data back from a vehicle (round trip) in ~11ms which is more in-line with other ODB-II logging software.

      Regarding a fix/enhancement for this, it would be nice if this value as adjustable (or an optional param in the writeFrame call).

      ODB-II pids: https://en.wikipedia.org/wiki/OBD-II_PIDs

      Attachments

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

        Activity

          People

            hogandp Dan Hogan
            hogandp Dan Hogan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes