[Ovmsdev] Leaf 2016 30Kwh flapping SOC

ovms ovms at topphemmelig.no
Tue May 1 21:08:58 HKT 2018


Think I found out why I was unable to send mail to this list. (wrong sender address)

My 2016 Leaf still has flapping SOC.
I made the following changes in vehicle_nissanleaf.cpp and compiled the code.

case 0x50d: //Changed this from 5bc. 50d is the instrument SOC
uint16_t nl_gids = ((uint16_t) d[0] << 2) | ((d[1] & 0xc0) >> 6);
if (nl_gids == 1023)

uint16_t max_gids = MyConfig.GetParamValueInt("xnl", "maxGids", GEN_1_NEW_CAR_GIDS);
float km_per_kwh = MyConfig.GetParamValueFloat("xnl", "kmPerKWh", GEN_1_KM_PER_KWH);
float wh_per_gid = MyConfig.GetParamValueFloat("xnl", "whPerGid", GEN_1_WH_PER_GID);

StandardMetrics.ms_v_bat_soc->SetValue(nl_gids / 4); //Changed this so the value is divided by 4.

SOC now shows exactly the same in the app as the instrument-panel does, and is not flapping. (I know the instrument-panel is different from the true SOC)

My coding capabilities are limited so if someone has a better idea, I can test it on my car.

And now to a different thing:

The app supports unlocking and locking of doors. The feature doesn't seem to be implemented for the Nissan Leaf.
I have all the CAN-codes needed to make this work. Please let me know if I can contribute.

Kind regards,
Stein Arne Sordal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180501/2b48fa7d/attachment.html>

More information about the OvmsDev mailing list