[Ovmsdev] OVMS Poller module/singleton

Michael Balzer dexter at expeedo.de
Sun Apr 28 22:05:02 HKT 2024


The Twizy uses the poller to query the VIN (once) and DTCs (every 10 
seconds while driving), see rt_obd2.cpp.

It also has its own version of the OBD single request 
(OvmsVehicleRenaultTwizy::ObdRequest), which was the precursor for the 
generalized version. This is used by custom/user Twizy plugins and 
scripts to access ECU internals.

The Twizy doesn't use IncomingPollRxFrame, but the Twizy's 
IncomingPollReply handler will log any poll responses it doesn't know 
about, so that could lead to a lot of log output if something goes wrong 
there.


Am 28.04.24 um 15:49 schrieb Michael Geddes via OvmsDev:
> AFAICT the twizzy doesn't use the poller list at all.  So is it 
> missing a call-back or something??
>
> I can see a potential problem with IncomingPollRxFrame being called 
> twice as much as it should be but only when there is a poll list.  
> Maybe commenting out this would do it.  (I can find another away to 
> get this called on the thread I want).  This might be the problem with 
> the smarted
>
> void OvmsVehicle::OvmsVehicleSignal::IncomingPollRxFrame(canbus* bus, 
> CAN_frame_t *frame, bool success)
>   {
>   //if (Ready())
>   //  m_parent->IncomingPollRxFrame(frame, success);
>   }
>
> //.
>
>
> On Sun, 28 Apr 2024 at 21:10, Michael Balzer via OvmsDev 
> <ovmsdev at lists.openvehicles.com> wrote:
>
>     There may also be an issue with the Renault Twizy, I've received a
>     report of a user who is using the edge builds, that the latest
>     build wouldn't work.
>
>     He reports all kinds of errors and warnings signaled by the car
>     during driving, and switching back to the previous build fixed the
>     issues.
>
>     I've asked him to provide a debug log excerpt if possible.
>
>     Regards,
>     Michael
>
>
>     Am 28.04.24 um 14:29 schrieb Michael Geddes via OvmsDev:
>>     OK. That's bad.
>>
>>     Does the reading work in general?
>>
>>     Is it just the writing commands?
>>
>>     Raise a ticket on github and tag me in and we can address it that
>>     way.
>>
>>     Michael
>>
>>     On Sun, 28 Apr 2024, 19:49 Thomas Heuer via OvmsDev,
>>     <ovmsdev at lists.openvehicles.com> wrote:
>>
>>         Hi,
>>
>>         The new poller code doesn't seem to work properly with the
>>         smarted.
>>
>>         D (218831) vehicle-poll: [1]PollerNextTick(PRI): cycle
>>         complete for ticker=215
>>
>>         V (218831) vehicle-poll: Standard Poll Series: List reset
>>
>>         D (218831) vehicle-poll:
>>         PollSeriesList::NextPollEntry[!v.standard]: ReachedEnd
>>
>>         V (218831) vehicle-poll: [1]PollerSend: Poller Reached End
>>
>>         D (219691) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         D (219691) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219691) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219691) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219691) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         V (219691) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219691) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         *OVMS#*unlock 22
>>         Vehicle unlocked
>>
>>         V (219691) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219691) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219691) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         V (219701) vehicle-poll: Pollers: FrameRx(bus=2)
>>
>>         D (219701) vehicle-poll: Poller: Queue PollerFrame()
>>
>>         *Von:*OvmsDev <ovmsdev-bounces at lists.openvehicles.com> *Im
>>         Auftrag von *Michael Geddes via OvmsDev
>>         *Gesendet:* Sonntag, 28. April 2024 12:27
>>         *An:* OVMS Developers <ovmsdev at lists.openvehicles.com>
>>         *Cc:* Michael Geddes <frog at bunyip.wheelycreek.net>
>>         *Betreff:* [Ovmsdev] OVMS Poller module/singleton
>>
>>         Hey all,
>>
>>         The poller singleton code that I've been working on for over
>>         a year now is merged in. (Thanks Michael for expediting the
>>         final step).
>>
>>         This includes separate multi-frame states per bus and
>>         multiple poll lists as well as non-blocking one off queries.
>>         As well as more 'states'.
>>
>>         I have included some programming documentation in the change
>>         but am happy to supply more if needed.
>>
>>         The ioniq 5 code has some examples of how it can be used.
>>         Some examples are:
>>
>>         * grabbing the vin as a one shot without blocking
>>
>>         * having a short list of queries that are polled quickly for
>>         obd2ecu (this also demonstrates using a shorter frame break
>>         value and then a break after successful a response)
>>
>>         Have a play please!
>>
>>         Also interested in hearing what user tools might be worth
>>         looking at next for the poller object.
>>
>>         //.ichael G.
>>
>>         _______________________________________________
>>         OvmsDev mailing list
>>         OvmsDev at lists.openvehicles.com
>>         http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
>>
>>     _______________________________________________
>>     OvmsDev mailing list
>>     OvmsDev at lists.openvehicles.com
>>     http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
>     -- 
>     Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
>     Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>
>     _______________________________________________
>     OvmsDev mailing list
>     OvmsDev at lists.openvehicles.com
>     http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20240428/747fc8e9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20240428/747fc8e9/attachment-0001.sig>


More information about the OvmsDev mailing list