[Ovmsdev] Volt/Ampera SOC and more

mikeljo at me.com mikeljo at me.com
Sat Dec 1 20:01:37 HKT 2012


Hi Michael,

you are right. 
I change it. And now it looks that it works.
In the original code the clamps were there.
I dont know why they gone lost.

THX

Bye
Michael


Am 29.11.2012 um 23:59 schrieb Michael Balzer <dexter at expeedo.de>:

> Hi Michael,
> 
> Am 29.11.2012 20:15, schrieb Michael Jochum:
>>    	v = (can_databuffer[1]+(unsigned int) can_databuffer[0] << 8);
> 
> That's an annoying C logic trap: + has precedence over <<.
> 
>    v = can_databuffer[1]+((unsigned int) can_databuffer[0] << 8);
> 
> ...should do.
> 
> Regards,
> Michael
> 
> -- 
> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
> 
> <dexter.vcf>_______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev




More information about the OvmsDev mailing list