[Ovmsdev] Leaf Updates

Tom Parker tom at carrott.org
Sun Nov 26 06:06:29 HKT 2017


On 20/11/17 02:49, Mark Webb-Johnson wrote:
> In v3, I haven’t bother with listen-only. Looking at connections to 
> api.openvehicles.com <http://api.openvehicles.com>, all but 2 vehicles 
> have feature 15=1 (and those are probably mistakes by the end-user).

OK I won't worry about porting that code.

>> In v2 I abstracted the hardware interactions necesary to write to the 
>> canbus into a function void vehicle_nissanleaf_send_can_message(short 
>> id, unsigned char length, unsigned char *data). In v3 we call 
>> canbus::Write(const CAN_frame_t* p_frame). Do we want to add a 
>> similar simpler "send to this buffer with this can id" method to the 
>> canbus object? The Leaf doesn't use any of the extended can features 
>> so a simple interface for the simple case seems to make sense. For 
>> the moment I've implemented it within the leaf codebase, see void 
>> OvmsVehicleNissanLeaf::SendCanMessage(uint16_t id, uint8_t length, 
>> uint8_t *data) in the pull request.
>
> No harm in adding that, if you think it is useful. Please go ahead.

I've updated 
https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/9

I used method overloading, which I've previously learnt isn't as 
straightforward as it is in Java. Please advise if this is an 
appropriate way to add two Write methods to the canbus object.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20171126/ea05da42/attachment.html>


More information about the OvmsDev mailing list