<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think in general things like this should be handled in the common vehicle code, rather than all vehicle modules. In this case, the vehicle module control v.e.on and park time can be maintained centrally (irrespective of the vehicle type).<div class=""><br class=""></div><div class="">Given the v3 server code, it makes more sense for park time in v3 to mean number of seconds since vehicle was parked (like in the protocol for v2).</div><div class=""><br class=""></div><div class="">I’ve added that logic into vehicle.cpp, and updated the other vehicle modules not to change it at all. I’ve also fixed ovms_server_v2 to handle it correctly.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Nov 2017, at 5:55 AM, Geir Øyvind Vælidalo <<a href="mailto:geir@validalo.net" class="">geir@validalo.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">«Quick» question:</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">StdMetrics.ms_v_env_parktime, is it seconds since the car was parked, which means we should update it in Ticker1? Or is it the time when the car was parked? </div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">Looking at V2 and the OVMS-V2conversion in V3, it looks to me like the first, but looking at the Twizy-module it looks like the latter.</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">I guess setting the start time should be enough. When sending packets to V2-server, we could easily calculate the seconds: time(NULL)-ms_v_env_parktime. Unless ms_v_env_parktime is 0, then we’re not parked. </div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">The same could then be done for ms_v_charge_minutes too.</div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Monaco;" class="">Geir </div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>