Geir Øyvind Vælidalo
geir at validalo.net
Fri Nov 24 19:11:00 HKT 2017
I agree, Mark. That was a clean solution.
Shouldn't we do the same with ms_v_charge_state and ms_v_charge_minutes too?
> 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).
> 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).
> 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.
> Regards, Mark.
>> On 24 Nov 2017, at 5:55 AM, Geir Ãyvind VÃ¦lidalo <geir at validalo.net>
>> Â«QuickÂ» question:
>> 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?
>> 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.
>> 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.
>> The same could then be done for ms_v_charge_minutes too.
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
More information about the OvmsDev