[Ovmsdev] ECU / HUD and OBD Poller response redesign
frog at bunyip.wheelycreek.net
Sat Mar 11 10:29:31 HKT 2023
I have a big change set coming for the OBD Poller that has really improved
what I have been able to do with the responsiveness of the HUD and should
provide a framework for consolidation of custom polling designs.
The aim was to:
- Have a single interface to the poll list that moves the one-shot
blocking polling and the default list polling behind a single interface
- Have the ability to have multiple poll-lists / responders active at once.
- Be able to have responders that could use any spare polling time to
continually update a value without impinging on moving to the 'next poll
count'. (For example speed and rpm)
- Be able to have a once-off responder that is non-blocking (for example a
request for the VIN which is a once-off but requires the car to be 'on' for
All this I have implemented and am just finalising now - doing some
stability testing and going through it to make sure it does what it needs
to. The bulk of ISOTP and VWTP code has been left alone, with the
exception of where it used to interface back to the poll queue / once-off
I have a class that represents a poll responder, and a class that handles a
list of responders. 'Blocking' handlers are treated specially. Implemented
so far is:
List Poller - to handle the standard list of entries
Blocking Once-Off poller - to handle PollSingleRequest
Data Buffer List Poller - handles a standard list but calls back with the
complete data rather than frame-by-frame.
Once-Off Poller - Handles a single request (with retries) but is
On my TODO list is a special poll responder that allows us to add user
entries that would grab/interpret particular ecu addresses on the fly and
place them either in metrics or a special temporary metric area. This would
enable better testing of values while driving (for example, I want to know
which flag is for the brake being pressed, and which one is for the brake
light, and I can use the ECU to display these on a HUD without recompiling).
I would appreciate any thoughts on this. I might be pushing it up as a
draft soon, but the usage of it in the I5 code does depend on the sub-tick
p/r so I might wait for that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OvmsDev