<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>I have wanted to implement charging and driving logs, for some time now. The idea is the car will record 'drives' and 'charges' and report them back as historical records. This will be independent of the vehicle module, so should work for all supported vehicles.</div><div><br></div><div>For each drive, we need:</div><div><br></div><div><ul class="MailOutline"><li>End time [4 bytes]</li><li>Duration (seconds) [2 bytes]</li><li>Drive mode [1 byte]</li><li>Start location [8 bytes]</li><li>End location [8 bytes]</li><li>Distance driven [2 bytes]</li><li>kWh used [2 bytes]</li></ul></div><div><br></div><div>For each charge, we need:</div><div><br></div><div><ul class="MailOutline"><li>End time [4 bytes]</li><li>Duration (seconds) [2 bytes]</li><li>Charge mode [1 byte]</li><li>Charge location [8 bytes]</li><li>Current available [1 byte]</li><li>Current used [1 byte]</li><li>Voltage [2 bytes]</li><li>Result (completed, stopped, failed) [1 byte]</li><li>kWh used [1 byte]</li></ul></div><div><br></div><div>That is 27 bytes per drive, or 21 bytes per charge.</div><div><br></div><div>The problem is that GPRS connectivity may not be there at the end of the drive or charge, so we need to store these records. RAM would be good, but we only have 429 bytes left (and I think 256 bytes of that may be stack). EEPROM is also possible, but full of parameters at the moment.</div><div><br></div><div>I'm thinking of using the top 4 parameters (#20 through #23) - these appear to be free at the moment, and would give us 128 bytes of permanent storage. Easiest would be 32 bytes for each record.</div><div><br></div><div>This would be turned on with a FEATURE_CARBITS (suggestion: 0x80), so it would default off (for privacy).</div><div><br></div><div>Comments / suggestions?</div><div><br></div><div>Regards, Mark.</div><div><br></div></body></html>