[Ovmsdev] Change to API for vehicle poll0 and poll1 functions
Mark Webb-Johnson
mark at webb-johnson.net
Sat Nov 2 21:14:49 HKT 2013
I just committed a change to all vehicle modules, to change the api for the poll0() and poll1() functions.
1aaa0a3 Move can bus low level register access to vehicle.c, out of individual vehicle modules
The new API sets up:
unsigned int can_id; // ID of can message
unsigned char can_filter; // CAN filter
unsigned char can_datalength; // The number of valid bytes in the can_databuffer
unsigned char can_databuffer[8]; // CAN message bytes
prior to the calls to poll0() and poll1(). So, the individual vehicle modules no longer need to (and no longer are able to) access the low-level CAN bus registers in any way.
I tried to move all the vehicle modules to the new mechanism, but there seemed to be significant differences in the way each module did things. Hopefully the work I did was ok and hasn’t broken anything, but please check your respective modules to make sure they still work.
Overall, we’ve saved about 500-to-600 bytes of flash doing this.
I’ve labelled this 2.6.1, as it has the capacity to break things.
Regards, Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20131102/edf6444b/attachment.htm>
More information about the OvmsDev
mailing list