[Ovmsdev] OVMS Poller module/singleton
Derek Caudwell
d.caudwell at gmail.com
Tue Feb 4 09:00:31 HKT 2025
Hi Chris
I can't see any issue with setting the poll state to OFF if the charger
state is either CHARGER_STATUS_IDLE or CHARGER_STATUS_PLUGGED_IN_TIMER_WAIT,
particularly if the can bus goes to sleep in these states.
Kind regards
Derek
On Tue, 4 Feb 2025 at 11:47, Chris Box via OvmsDev <
ovmsdev at lists.openvehicles.com> wrote:
> On 2025-02-03 07:34, Michael Balzer wrote:
>
> This is the moment the vehicle state change was detected:
>
> 2025-02-02 21:08:14.372 GMT D (338493292) events:
> Signal(vehicle.charge.stop)
>
>
> The event is emitted automatically by the vehicle framework when metric
> "v.c.charging" (ms_v_charge_inprogress) changes from true to false.
>
> I don't know the Leaf code, but I think that should directly lead to a
> poller state change, but doesn't.
>
>
>
> In vehicle_nissanleaf.cpp
> <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/vehicle/OVMS.V3/components/vehicle_nissanleaf/src/vehicle_nissanleaf.cpp>
> there are four places where we have
> "StandardMetrics.ms_v_charge_inprogress->SetValue(false);"
> They're all in the same switch statement block.
>
> Two of them also say "PollSetState(POLLSTATE_OFF);"
> These are CHARGER_STATUS_INTERRUPTED and CHARGER_STATUS_FINISHED.
>
> The two that don't set poll state are CHARGER_STATUS_IDLE and
> CHARGER_STATUS_PLUGGED_IN_TIMER_WAIT.
>
> For anyone that knows the Leaf code, does it seem reasonable to add
> PollSetState(POLLSTATE_OFF) to both of those? I note there's a mysterious
> comment "Separate from vehicle_nissanleaf_poll1() to make it clearer what
> is going on." but I can find no record of such a function in the current
> repo.
>
> Chris
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20250204/e63da04b/attachment.htm>
More information about the OvmsDev
mailing list