[Ovmsdev] Volt/Ampera SOC and more
mikeljo at mac.com
Fri Nov 30 03:15:18 HKT 2012
i implement the following code into the FW:
unsigned int soc_largest = 56028; // this is from mark, readout from the logs
unsigned int soc_smallest = 13524; // this too
unsigned int v;
v = (can_databuffer+(unsigned int) can_databuffer << 8);
if ((v<soc_smallest)&&(v>0)) v=soc_smallest;
if (v>soc_largest) v=soc_largest;
car_SOC = (char)((v-soc_smallest)/((soc_largest-soc_smallest)/100));
i got funny Outputs in the iPhone app.
Something between 0 and 100%. Not match to the real state. Full can display as 0% or 20, or......
Empty can show as 100%, or something else.
This code (org. mark) works:
car_SOC = (char)((can_databuffer+((unsigned int) can_databuffer << 8))/644);
With this i got 21-87% for the soc.
BTW: i thing it is a good idea to deactivate the minSOC warning. It is not nessary for the Volt/Ampera.
I activate the internal GPS (OVMS_INTERNALGPS) and get the position from my car. GREAT WORK.
I got no Info about the VIN, the OVMS FW and the car type in the iPhone App. 1.3.2 build from the git.
More information about the OvmsDev