<div dir="ltr">From what i remember this should be a easy fix.<div><br><div>The car_speed and car_odometer @ PID 412 is only updated when ignition is ON.</div><div>So setting the car_doors1bits.CarOn = 1 when PID 412 is received should fix this issue. Setting car_doors1bits.CarOn = 0 when no CANBUS activity is already implemented in the code.</div>
<div><br></div><div>Regards, Thomas</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-08 7:51 GMT+02:00 Tom Saxton <span dir="ltr"><<a href="mailto:tom@idleloop.com" target="_blank">tom@idleloop.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><font face="Calibri,sans-serif">It sounds like the Mitsubishi code is setting the </font><font face="Calibri,sans-serif">car_doors1bits.CarON incorrectly. That bit should only be set if the car is turned on. Perhaps it needs to be more discerning as to which CAN messages indicate the car is on.</font></div>
<div><font face="Calibri,sans-serif"><br></font></div><div><font face="Calibri,sans-serif"> Tom</font></div><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px"><br></div><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px"><div>
<div>On 6/7/14, 2:32 PM, "Nikolay Shishkov" <<a href="mailto:nshishkov@yahoo.com" target="_blank">nshishkov@yahoo.com</a>> wrote:</div></div><div><br></div><div><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt">
<div><span style="font-size:12pt">I have been testing the logging for the mitsubishi and noticed a problem with it - no matter if I was charging or driving the log was always showing driving. </span><br></div><div>I have been looking at the code and I think I found the problem. If I understand this correctly <span style="font-size:12pt">in vehicle_mitsubishi_ticker1 function in vehicle_mitsubishi.c file the car_doors1bits.CarON is set depending on wheather there is CAN bus communication. This is unfortunate since the car_doors1bits.CarON (via CAR_IS_ON) is used in the logging.c to determine if the car is "driving"... and if it is, then it is not "charging". </span></div>
<div style="color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent"><span style="font-size:12pt"><br>
</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent">I am not sure what the best solution would be:</div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent"> - to set the <span style="font-size:12pt">car_doors1bits.CarON to 0 if the car is charging or</span></div>
<div style="color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent"><span style="font-size:12pt"> - to refactore the logging code to prefer the CAR_IS_CHARGING and test for it first in the various if/else statements.</span></div>
<div style="color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent"><span style="font-size:12pt"><br>
</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent">I have not been able to build and test any of this yet. </div>
<div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent">
Any comments, ideas, suggestions on how to solve this?</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent">
<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-style:normal;background-color:transparent">Nikolay</div><div>
<br></div><div> </div></div></div></div>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.teslaclub.hk" target="_blank">OvmsDev@lists.teslaclub.hk</a>
<a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target="_blank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</span></div>
<br>_______________________________________________<br>
OvmsDev mailing list<br>
<a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target="_blank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
<br></blockquote></div><br></div>