No subject


Fri Sep 27 23:39:33 HKT 2013


The car_speed and car_odometer @ PID 412 is only updated when ignition is
ON.
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.

Regards, Thomas


2014-06-08 7:51 GMT+02:00 Tom Saxton <tom at idleloop.com>:

> It sounds like the Mitsubishi code is setting the 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.
>
>     Tom
>
> On 6/7/14, 2:32 PM, "Nikolay Shishkov" <nshishkov at yahoo.com> wrote:
>
> 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.
> I have been looking at the code and I think I found the problem. If I
> understand this correctly 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".
>
> I am not sure what the best solution would be:
>  - to set the car_doors1bits.CarON to 0 if the car is charging or
>  - to refactore the logging code to prefer the CAR_IS_CHARGING and test
> for it first in the various if/else statements.
>
> I have not been able to build and test any of this yet.
>
> Any comments, ideas, suggestions on how to solve this?
>
> Nikolay
>
>
> _______________________________________________ OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
>

--089e0149401adc6a2d04fb4e4255
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">From what i remember this should be a easy fix.<div><br><d=
iv>The car_speed and car_odometer @ PID 412 is only updated when ignition i=
s ON.</div><div>So setting the car_doors1bits.CarOn =3D 1 when PID 412 is r=
eceived should fix this issue. Setting car_doors1bits.CarOn =3D 0 when no C=
ANBUS activity is already implemented in the code.</div>
<div><br></div><div>Regards, Thomas</div></div></div><div class=3D"gmail_ex=
tra"><br><br><div class=3D"gmail_quote">2014-06-08 7:51 GMT+02:00 Tom Saxto=
n <span dir=3D"ltr">&lt;<a href=3D"mailto:tom at idleloop.com" target=3D"_blan=
k">tom at idleloop.com</a>&gt;</span>:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word"><div><fo=
nt face=3D"Calibri,sans-serif">It sounds like the Mitsubishi code is settin=
g the </font><font face=3D"Calibri,sans-serif">car_doors1bits.CarON incorre=
ctly. 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.</fo=
nt></div>
<div><font face=3D"Calibri,sans-serif"><br></font></div><div><font face=3D"=
Calibri,sans-serif">=C2=A0 =C2=A0 Tom</font></div><div style=3D"color:rgb(0=
,0,0);font-family:Calibri,sans-serif;font-size:14px"><br></div><span style=
=3D"color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:14px"><div>
<div>On 6/7/14, 2:32 PM, &quot;Nikolay Shishkov&quot; &lt;<a href=3D"mailto=
:nshishkov at yahoo.com" target=3D"_blank">nshishkov at yahoo.com</a>&gt; wrote:<=
/div></div><div><br></div><div><div><div style=3D"color:#000;background-col=
or:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Gra=
nde,sans-serif;font-size:12pt">
<div><span style=3D"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.=C2=A0</span><br></div><div>I ha=
ve been looking at the code and I think I found the problem. If I understan=
d this correctly=C2=A0<span style=3D"font-size:12pt">in=C2=A0vehicle_mitsub=
ishi_ticker1 function in=C2=A0vehicle_mitsubishi.c file the=C2=A0car_doors1=
bits.CarON is set depending on wheather there is CAN bus communication. Thi=
s is unfortunate since the=C2=A0car_doors1bits.CarON (via CAR_IS_ON) is use=
d in the logging.c to determine if the car is &quot;driving&quot;... and if=
 it is, then it is not &quot;charging&quot;.=C2=A0</span></div>
<div style=3D"color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,&#3=
9;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;fo=
nt-style:normal;background-color:transparent"><span style=3D"font-size:12pt=
"><br>
</span></div><div style=3D"color:rgb(0,0,0);font-size:16px;font-family:Helv=
eticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,=
sans-serif;font-style:normal;background-color:transparent">I am not sure wh=
at the best solution would be:</div>
<div style=3D"color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,&#3=
9;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;fo=
nt-style:normal;background-color:transparent">=C2=A0- to set the=C2=A0<span=
 style=3D"font-size:12pt">car_doors1bits.CarON to 0 if the car is charging =
or</span></div>
<div style=3D"color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,&#3=
9;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;fo=
nt-style:normal;background-color:transparent"><span style=3D"font-size:12pt=
">=C2=A0- to refactore the logging code to prefer the CAR_IS_CHARGING and t=
est for it first in the various if/else statements.</span></div>
<div style=3D"color:rgb(0,0,0);font-size:12pt;font-family:HelveticaNeue,&#3=
9;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;fo=
nt-style:normal;background-color:transparent"><span style=3D"font-size:12pt=
"><br>
</span></div><div style=3D"color:rgb(0,0,0);font-size:16px;font-family:Helv=
eticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,=
sans-serif;font-style:normal;background-color:transparent">I have not been =
able to build and test any of this yet.=C2=A0</div>
<div style=3D"color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,&#3=
9;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;fo=
nt-style:normal;background-color:transparent"><br></div><div style=3D"color=
:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,&#39;Helvetica Neue&#3=
9;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-style:normal;bac=
kground-color:transparent">
Any comments, ideas, suggestions on how to solve this?</div><div style=3D"c=
olor:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,&#39;Helvetica Neu=
e&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-style:normal=
;background-color:transparent">
<br></div><div style=3D"color:rgb(0,0,0);font-size:16px;font-family:Helveti=
caNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,san=
s-serif;font-style:normal;background-color:transparent">Nikolay</div><div>
<br></div><div>=C2=A0</div></div></div></div>______________________________=
_________________
OvmsDev mailing list
<a href=3D"mailto:OvmsDev at lists.teslaclub.hk" target=3D"_blank">OvmsDev at lis=
ts.teslaclub.hk</a>
<a href=3D"http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target=3D"_b=
lank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</span></div>
<br>_______________________________________________<br>
OvmsDev mailing list<br>
<a href=3D"mailto:OvmsDev at lists.teslaclub.hk">OvmsDev at lists.teslaclub.hk</a=
><br>
<a href=3D"http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target=3D"_b=
lank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
<br></blockquote></div><br></div>

--089e0149401adc6a2d04fb4e4255--


More information about the OvmsDev mailing list