Poll lists can be added with a state offset now. So we can just keep the states as-is for now.
//.
On Sun, 14 June 2026, 16:31 Michael Balzer via OvmsDev, < ovmsdev@lists.openvehicles.com> wrote:
Solterra,
the limit has no other reason than memory usage for the polling lists. 4 states have been sufficient for all vehicles up to now, but of course the limit can be changed.
Raising implicates higher memory usage from polling lists both in flash and RAM, so needs to be tested with all vehicles. There may be potential to keep or even cut down the space required by changing the
poll_pid_tstruct to packed mode, but you'll need to check all uses against assumptions of an unpacked layout (IMO there shouldn't be any, but better safe than sorry).Four separate charge states sounds a bit like over-engineering though. Other vehicles simply query both AC and DC PIDs for any charge session, after all it's just a couple of frames that could be saved -- except of course if the Toyota ECUs don't reply to PID reads depending on the mode, as that would introduce delays from timeouts. Another option could be to switch the polling list, i.e. prepare a dedicated list for charging.
But raising the state count to e.g. 8 would be acceptable, if no memory issues arise from the change.
Regards, Michael
Am 13.06.26 um 12:49 schrieb Solterra via OvmsDev:
Hi all,
While working on the Toyota e-TNGA platform module (Toyota bZ4X / Subaru Solterra), I ran into the VEHICLE_POLL_NSTATES limit in components/poller/src/vehicle_poller.h.
I wanted to produce richer charging tracking / reporting than a single "charging" state, so I came up with a cable-negotiation/handshake window, a plugged-but-idle wait, and separate AC and DC phases each needing their own poll cadences (like PISW at 1 s during handshake but 30 s while waiting and station-telemetry PIDs only in DC). I ended up with 7 poll states total (SLEEP, AWAKE, DRIVING, plus four charge phases) versus the 4 the framework currently allows.
My questions:
- Is there a reason VEHICLE_POLL_NSTATES was fixed at 4?
- Would the project accept widening it, and if so, in what form would you prefer?
Thanks
OvmsDev mailing list -- ovmsdev@lists.openvehicles.com To unsubscribe send an email to ovmsdev-leave@lists.openvehicles.com
-- Michael Balzer * Am Rahmen 5 * D-58313 Herdecke Fon 02330 9104094 * Handy 0176 20698926
OvmsDev mailing list -- ovmsdev@lists.openvehicles.com To unsubscribe send an email to ovmsdev-leave@lists.openvehicles.com