<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; ">Hi,<div><br></div><div>i ask in the german Ampera Forum about the SOC.</div><div>The iPhone App shows minimum 21% to max. 87%. This is the usable Batterie window.</div><div>Now they would have 0-100% in the App.</div><div>As a "quick and dirty" fix i do this in the App:</div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0); "><span style="color: #000000"> </span><span style="color: #4f8187">car_soc</span><span style="color: #000000"> = ([[lparts </span><span style="color: #3d1d81">objectAtIndex</span><span style="color: #000000">:</span><span style="color: #272ad8">0</span><span style="color: #000000">] </span><span style="color: #3d1d81">intValue</span><span style="color: #000000">]-</span><span style="color: #272ad8">21</span><span style="color: #000000">)*(</span><span style="color: #272ad8">100.0</span><span style="color: #000000">/</span><span style="color: #272ad8">66.0</span><span style="color: #000000">);  </span>// 21 - 87% = 0 - 100%  1,515151515151515  MJ</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0); "><span style="color: #000000">        </span>//car_soc = [[lparts objectAtIndex:0] intValue];  org</div></div><div>in the ovmsAppDelegate.m</div><div>Yes i know i can divide by 1.515. But for showing what i do, i do it this way.</div><div>It was faster to change it in the App, but i think it is better to do it in the Module.</div><div>One Problem can occur: If the SOC reaches 21% the car switches to the RangeExtender (RE). BUT the SOC can fall to 18%. At the other end, when the batterie is fully charged (SOC 87%) and the car goes downhill the SOC can go to nearly 90% (or more, i don't know).</div><div>What happend with the App? The 21% (0%) i can test tomorow, but i have no so big hill near me. :)</div><div><br></div><div>BTW: the iPad App don't shows any car Pics on the main screen.</div><div><br></div><div>Bye</div><div>michael</div><div><br></div><div><br></div><div><div><div>Am 04.11.2012 um 14:21 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><blockquote type="cite">That wasn't me.<br></blockquote><br>Whoops. Michael Jochum...<br><br><blockquote type="cite">ROM space is plenty, I'm more concerned about the RAM usage. Can those car specific #pragma udata globals easily be replaced by a dynamic object to be allocated on module init?<br></blockquote><br>The Microchip compiler has an 'overlay' facility. We can put them in the same memory bank so they all overlay each other. You are correct - RAM is the concern.<br><br><blockquote type="cite">So it seems to be necessary to implement some dynamic data / protocol configuration model as well? I.e. divide into a common set of properties available on most car models plus a dynamic car special feature property set.<br></blockquote><br><br>I think the existing model should work for the EVs I've seen. There are some problems that will need to be fixed (e.g.; imperial-only units for ranges), and some extensions made (e.g.; 2 extra doors for saloon style cars), but those are pretty small.<br><br>For major new feature specific to a particular vehicle, I was hoping we can handle those by the command protocol. We could, for instance, route commands 100-200 directly through to the vehicle modules for response. We could also add hooks for the vehicle modules to directly transmit messages out (the protocol itself is extensible and new message types can be easily added).<br><br><blockquote type="cite">l (btw: I can only read up to line 201 of docs/OVMS_Protocol.doc using UTF-16 -- rest is garbled)<br></blockquote><br>Yes, I've noticed that. From what I can see, it is just garbage tacked on the end but I've been meaning to convert this to a better document. We have full revision control on this.<br><br><blockquote type="cite">The Twizy has 14 cell packs (14S 2P we think) and we've got their voltages on CAN. Even for the small Twizy pack + data compression this will need some RAM (or server traffic + App support).<br></blockquote><br>I think that stuff like this is going to be _very_ hard to fit in ram, but does it actually need to be stored? Say we have 16 can bus messages to send out. We could just use a 2byte bit array with a bit high indicating we need the figure. If the message arrives on the can bus, and the corresponding bit it high, it can get queued for transmission directly, then the bit cleared. I'm not sure if that is clear (hard to explain it in writing), but what I'm saying is have a mechanism for the can driver to be able to queue stuff for transmission directly from the incoming can message. So, rather than storing 16 messages for transmission, we don't need to store any - just have a flag to say 'transmit the values when it next comes off the bus'.<br><br><blockquote type="cite">So, maybe the data and protocol models need to be generalized first?<br></blockquote><br>I think it just needs to be documented better, and expanded as necessary. Let's then see how things fit into that. I'll work on this now, as both Michael's need this urgently.<br><br>Regards, Mark.<br><br>On 4 Nov, 2012, at 8:37 PM, Michael Balzer <<a href="mailto:dexter@expeedo.de">dexter@expeedo.de</a>> wrote:<br><br><blockquote type="cite"><br>Am 04.11.2012 04:11, schrieb Mark Webb-Johnson:<br><blockquote type="cite">A while ago, Michael Balzer suggested to me that it would be best to have one firmware supporting all cars.<br></blockquote><br>That wasn't me. The idea sounds good, but...<br><br>- car platforms to be supported will increase steadily now, there are lots to come in the next years<br>- even cars with decent builtin online monitoring systems lack some functionality for nerds like us<br>- there will be a need for custom product configuration per car anyway, as cabling and antenna configuration will be different<br><br>ROM space is plenty, I'm more concerned about the RAM usage. Can those car specific #pragma udata globals easily be replaced by a dynamic object to be allocated on module init?<br><br>Also, not only the CAN module may need car specific adaption. I've not yet completely read into the server protocol (btw: I can only read up to line 201 of docs/OVMS_Protocol.doc using UTF-16 -- rest is garbled), but got the impression it contains some common and some Tesla specific data. If we have to integrate specific data from every model supported, the data stream can become quite fat. So it seems to be necessary to implement some dynamic data / protocol configuration model as well? I.e. divide into a common set of properties available on most car models plus a dynamic car special feature property set.<br><br>Example: one of my next ideas is a cell monitor to get a history of the cell voltage levels, so I can detect and alert about cell failures early. The Twizy has 14 cell packs (14S 2P we think) and we've got their voltages on CAN. Even for the small Twizy pack + data compression this will need some RAM (or server traffic + App support). The Tesla has an 11S 9S 69P configuration (?), so that would need much more history RAM + possibly another data layout -- if the voltages are on CAN at all.<br><br>Another example I already stumbled on: the car_doors1 flag 0x04 (charge port open) is currently used by net_sms_stat(), if it's not set, it assumes "not charging". So even some standard functions rely on Tesla specific data.<br><br>So, maybe the data and protocol models need to be generalized first? Or am I missing something?<br><br>Regards,<br>Michael<br><br>-- <br>Michael Balzer * Paradestr. 8 * D-42107 Wuppertal<br>Fon 0202 / 272 2201 * Handy 0176 / 206 989 26<br><dexter.vcf>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br></blockquote><br>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br></blockquote></div><br></div></body></html>