<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p id="reply-intro">On 2025-02-03 07:34, Michael Balzer wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">This is the moment the vehicle state change was detected:<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><span style="font-family: 'courier new', courier, monospace; font-size: 8pt;">2025-02-02 21:08:14.372 GMT D (338493292) events: Signal(vehicle.charge.stop)</span></blockquote>
<br />The event is emitted automatically by the vehicle framework when metric "v.c.charging" (ms_v_charge_inprogress) changes from true to false.<br /><br />I don't know the Leaf code, but I think that should directly lead to a poller state change, but doesn't.</div>
<div> </div>
</blockquote>
<div> </div>
<div>In <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/vehicle/OVMS.V3/components/vehicle_nissanleaf/src/vehicle_nissanleaf.cpp">vehicle_nissanleaf.cpp</a> there are four places where we have "StandardMetrics.ms_v_charge_inprogress->SetValue(false);"</div>
<div>They're all in the same switch statement block.</div>
<div> </div>
<div>Two of them also say "PollSetState(POLLSTATE_OFF);"</div>
<div>These are CHARGER_STATUS_INTERRUPTED and CHARGER_STATUS_FINISHED.</div>
<div> </div>
<div>The two that don't set poll state are CHARGER_STATUS_IDLE and CHARGER_STATUS_PLUGGED_IN_TIMER_WAIT.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>Chris</div>
</body></html>