[Ovmsdev] V3 progress

Mark Webb-Johnson mark at webb-johnson.net
Mon Oct 23 20:06:36 HKT 2017


I’ve implemented the first part of this. It does look very neat, and seems to work well. A lot of duplication in the vehicle modules has been removed.

But, it will break vehicle module implementations, so I’ve updated those as well. All is in GitHub now, so please pull, merge, and check.

I’ve also updated the developer’s documentation to reflect these changes.

I’ll work on the polling next, although that will probably not be quite so simple.

Regards, Mark.

> On 23 Oct 2017, at 3:00 PM, Mark Webb-Johnson <mark at webb-johnson.net> wrote:
> 
> Looking at the vehicle modules now, I think we can standardise a few things in vehicle.{h,cpp} base class:
> 
> Simple registration of CAN buses required to be listened on, mode and speed.
> Virtual functions for receiving CAN bus messages on can1, can2, and can3.
> Incoming CAN message queue and reception task (with dispatch to appropriate virtual receiving function).
> 
> That way, the vehicle module just has to call the function to configure the CAN ports it requires, then handle the incoming CAN messages in a virtual function. No messing around with tasks/queues. The reason we need this standardised is because for the poll functions we need to be able to intercept incoming poll reply messages and convert them to PID polling - having the individual vehicle modules handle the incoming message queue makes that tricky.
> 
> Once that is done, then for this polling:
> 
> Simple registration of PIDs to be polled, on which modules.
> Poll mode set (like v2).
> If polling, look at incoming CAN bus messages and don’t pass on to the raw message handlers if it is a poll response.
> Virtual function for receiving poll responses.
> 
> I’ll have a look at it. Probably have to do a quick port of the vehicle_obdii code from v2, in order to be able to test it.
> 
> Regards, Mark.
> 
>> On 23 Oct 2017, at 2:49 PM, Geir Øyvind Vælidalo <geir at validalo.net <mailto:geir at validalo.net>> wrote:
>> 
>> I think the V2 polling mechanism is ok. Can’t think of anything that I was missing...
>> A port must be able to handle all three can buses though 🙂
>> 
>> Geir 
>> 
>> Sendt fra min iPhone
>> 
>> 23. okt. 2017 kl. 08:19 skrev Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>:
>> 
>>> 
>>>> Is the poll functionality/framework in place, by the way?
>>> 
>>> Nope. And, I think that will have to be mine to do (as pretty fundamental) - unless someone else wants to step forward :-)
>>> 
>>> What do people think of the v2 polling mechanism? Shall I just straight port it (moving to the object model, of course), or are there things we need to change/improve to make it more usable?
>>> 
>>> Regards, Mark.
>>> 
>>>> On 23 Oct 2017, at 2:05 PM, Geir Øyvind Vælidalo <geir at validalo.net <mailto:geir at validalo.net>> wrote:
>>>> 
>>>> Great!
>>>> I missed the NL-part🙂
>>>> 
>>>> Is the poll functionality/framework in place, by the way?
>>>> 
>>>> Geir
>>>> 
>>>> Sendt fra min iPhone
>>>> 
>>>> 23. okt. 2017 kl. 03:52 skrev Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>:
>>>> 
>>>>> All good. I merged it, and changed NL->KS on line 41.
>>>>> 
>>>>> Regards, Mark.
>>>>> 
>>>>>> On 23 Oct 2017, at 9:19 AM, Tom Parker <tom at carrott.org <mailto:tom at carrott.org>> wrote:
>>>>>> 
>>>>>> Hi Geir,
>>>>>> 
>>>>>> I see you've got Soule on line 41, and you've used the NL vehicle code on line 63 of vehicle_kiasoulev.cpp.
>>>>>> 
>>>>>> Otherwise it looks good.
>>>>>> 
>>>>>> I've been porting the Leaf v2 logic with as few changes as possible. The changes are mostly simple, replacement of can_databuffer with d and replacing the global state variables with metrics setters. I can still make sense of a diff between the v3 .cpp file and the v2 .c file. Once I have full feature parity between v2 and v3, I'll probably refactor the cpp code some.
>>>>>> 
>>>>>> On 23/10/17 09:50, Geir Øyvind Vælidalo wrote:
>>>>>>> Mark, 
>>>>>>> 
>>>>>>> I just sent a Pull request for the initial Kia Soul EV-stub.
>>>>>>> I’m still a newbie on GIT so forgive me if I make a mess! Most of the time spent so far is setting up esp-idf and trying to figure out GIT again 🙂
>>>>>>> 
>>>>>>> Geir
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> OvmsDev mailing list
>>>>>>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>>>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
>>>>>> 
>>>>>> _______________________________________________
>>>>>> OvmsDev mailing list
>>>>>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
>>>>> 
>>>>> _______________________________________________
>>>>> OvmsDev mailing list
>>>>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk <mailto:OvmsDev at lists.teslaclub.hk>
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20171023/07dbb561/attachment.htm>


More information about the OvmsDev mailing list