PaulKennett / LeafRange

A better range "guess-o-meter" for early Nissan Leaf cars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

raw_Gids is stored in a byte

PaulKennett opened this issue · comments

the raw_gids variable is stored in a byte variable type so the max Gid vlur possible is 255.

A brand new 24kWh Leaf had 281 Gids. My 2011 Leaf had 225 Gids back in 2019 when fully charged.

Are there any 2017 24kWh Leafs with more than 255 Gids left? Maybe - but they probably wont be interested in this project.

If I had to store raw_Gids as a two byte variable in the 1024 byte Micro/Pro Mini EEPROM it would mean I could only store 335 Gid&Odo entries, instead of the 503 entries currently.

I think this limitation is OK for now.

But, if I ever upgraded to a system with a larger EEPROM then it would be worth switching to storing Gids in 2 bytes.