<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’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.<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">I’ve also updated the developer’s documentation to reflect these changes.</div><div class=""><br class=""></div><div class="">I’ll work on the polling next, although that will probably not be quite so simple.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 23 Oct 2017, at 3:00 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.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; -webkit-line-break: after-white-space;" class="">Looking at the vehicle modules now, I think we can standardise a few things in vehicle.{h,cpp} base class:<div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">Simple registration of CAN buses required to be listened on, mode and speed.</li><li class="">Virtual functions for receiving CAN bus messages on can1, can2, and can3.</li><li class="">Incoming CAN message queue and reception task (with dispatch to appropriate virtual receiving function).</li></ul></div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Once that is done, then for this polling:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">Simple registration of PIDs to be polled, on which modules.</li><li class="">Poll mode set (like v2).</li><li class="">If polling, look at incoming CAN bus messages and don’t pass on to the raw message handlers if it is a poll response.</li><li class="">Virtual function for receiving poll responses.</li></ul></div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 23 Oct 2017, at 2:49 PM, 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 dir="auto" class="">I think the V2 polling mechanism is ok. Can’t think of anything that I was missing...<div class="">A port must be able to handle all three can buses though 🙂<div class=""><br class=""></div><div class="">Geir <br class=""><br class=""><div class="">Sendt fra min iPhone</div><div class=""><br class="">23. okt. 2017 kl. 08:19 skrev Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>>:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="auto" class=""><div class="">Is the poll functionality/framework in place, by the way?</div></div></blockquote><br class=""></div><div class="">Nope. And, I think that will have to be mine to do (as pretty fundamental) - unless someone else wants to step forward :-)</div><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 23 Oct 2017, at 2:05 PM, 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 dir="auto" class="">Great!<div class="">I missed the NL-part🙂</div><div class=""><br class=""></div><div class="">Is the poll functionality/framework in place, by the way?</div><div class=""><br class=""></div><div class="">Geir<br class=""><br class=""><div class="">Sendt fra min iPhone</div><div class=""><br class="">23. okt. 2017 kl. 03:52 skrev Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>>:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class="">All good. I merged it, and changed NL->KS on line 41.<div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 23 Oct 2017, at 9:19 AM, Tom Parker <<a href="mailto:tom@carrott.org" class="">tom@carrott.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class=""><p class=""><span class="blob-code-inner"><span class="pl-s">Hi Geir,</span></span></p><p class=""><span class="blob-code-inner"><span class="pl-s">I see you've got
          Soule on line 41, and you've used the NL vehicle code on line
          63 of vehicle_kiasoulev.cpp.</span></span></p><p class=""><span class="blob-code-inner"><span class="pl-s">Otherwise it
          looks good.</span></span></p><p class=""><span class="blob-code-inner"><span class="pl-s">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.</span></span></p>
    <div class="moz-cite-prefix">On 23/10/17 09:50, Geir Øyvind Vælidalo
      wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:3A0BB387-E6D1-4C38-89A3-34F771F55421@validalo.net" class="">Mark, 
      <div class=""><br class="">
      </div>
      <div class="">I just sent a Pull request for the initial Kia Soul
        EV-stub.
        <div class="">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 🙂</div>
        <div class=""><br class="">
        </div>
        <div class="">Geir</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br class="">
  </div>

_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">OvmsDev mailing list</span><br class=""><span class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a></span><br class=""><span class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a></span><br class=""></div></blockquote></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">OvmsDev mailing list</span><br class=""><span class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a></span><br class=""><span class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a></span><br class=""></div></blockquote></div></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class=""><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></body></html>