Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.13.2
-
None
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.
- Call writeFrame (just puts the message into a send queue) : 0 ms
- Receive framesWritten signal (indicates message has actually been sent) : 98 ms
- 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