<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><br>I can change the code so the CarOn=1 only when that particular message (the 412) is received.  But I still need to set it to 0 when the car is not on and charging. </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;">The current code is setting the CarOn=0 when CANBUS communication is missing for 60 seconds, so If I park the car, and plug it without switching off the CarOn is going to stay 1. </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;">Maybe a timer on the 412 message? So
 if not received within 10 seconds I can set CarOn to 0?</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<br><br><br><br>------------------------------<br>Den sön 8 jun 2014 10:44 EEST skrev Thomas Bergo:<br><br>>From what i remember this should be a easy fix.<br>><br>>The car_speed and car_odometer @ PID 412 is only updated when ignition is<br>>ON.<br>>So setting the car_doors1bits.CarOn = 1 when PID 412 is received should fix<br>>this issue. Setting car_doors1bits.CarOn = 0 when no CANBUS activity is<br>>already implemented in the code.<br>><br>>Regards,
 Thomas<br>><br>><br>>2014-06-08 7:51 GMT+02:00 Tom Saxton <<a ymailto="mailto:tom@idleloop.com" href="mailto:tom@idleloop.com">tom@idleloop.com</a>>:<br>><br>>> It sounds like the Mitsubishi code is setting the car_doors1bits.CarON<br>>> incorrectly. That bit should only be set if the car is turned on. Perhaps<br>>> it needs to be more discerning as to which CAN messages indicate the car is<br>>> on.<br>>><br>>>     Tom<br>>><br>>> On 6/7/14, 2:32 PM, "Nikolay Shishkov" <<a ymailto="mailto:nshishkov@yahoo.com" href="mailto:nshishkov@yahoo.com">nshishkov@yahoo.com</a>> wrote:<br>>><br>>> I have been testing the logging for the mitsubishi and noticed a problem<br>>> with it - no matter if I was charging or driving the log was always showing<br>>> driving.<br>>> I have been looking at the code and I think I found the problem. If I<br>>>
 understand this correctly in vehicle_mitsubishi_ticker1 function<br>>> in vehicle_mitsubishi.c file the car_doors1bits.CarON is set depending on<br>>> wheather there is CAN bus communication. This is unfortunate since<br>>> the car_doors1bits.CarON (via CAR_IS_ON) is used in the logging.c to<br>>> determine if the car is "driving"... and if it is, then it is not<br>>> "charging".<br>>><br>>> I am not sure what the best solution would be:<br>>>  - to set the car_doors1bits.CarON to 0 if the car is charging or<br>>>  - to refactore the logging code to prefer the CAR_IS_CHARGING and test<br>>> for it first in the various if/else statements.<br>>><br>>> I have not been able to build and test any of this yet.<br>>><br>>> Any comments, ideas, suggestions on how to solve this?<br>>><br>>> Nikolay<br>>><br>>><br>>>
 _______________________________________________ OvmsDev mailing list<br>>> <a ymailto="mailto:OvmsDev@lists.teslaclub.hk" 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>>> _______________________________________________<br>>> OvmsDev mailing list<br>>> <a ymailto="mailto:OvmsDev@lists.teslaclub.hk" 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>>><br></div></div></body></html>