<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; ">Mark,<div>if car_chargestate will still have the value 4 when it comes from 0x04 to 0x63 then charge done seems correct.</div><div>I don't quite get the else if part. What does chargestate 21 represent? And if we don't come from 0x04 it has to be an interruption and therefore needs no further check with chargestate or chargesubstate, does it? I guess I'm missing something here.</div><div><br></div><div>Patrick</div><div><br></div><div><br><div><div>Am 14.04.2013 um 16:06 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"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Patrick,<div><br></div><div>There shouldn't be any 'charge complete' notifications - only 'charge interrupted':</div><div><br></div><div>Current logic is:</div><div><br></div><div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font face="Andale Mono"> case 0x63: // Charge done/failed (depending where we came from)</font></div><div><font face="Andale Mono"> car_doors1 &= ~0x0c; // Clear charge and pilot bits</font></div><div><font face="Andale Mono"> car_chargemode = 0; // Standard charge mode</font></div><div><font face="Andale Mono"> car_charge_b4 = 0; // Not required</font></div><div><font face="Andale Mono"> if (car_chargestate == 4)</font></div><div><font face="Andale Mono"> { // Charge done</font></div><div><font face="Andale Mono"> }</font></div><div><font face="Andale Mono"> else if (car_chargestate != 21)</font></div><div><font face="Andale Mono"> { // Charge interrupted</font></div><div><font face="Andale Mono"> car_chargestate = 21; // Charge STOPPED</font></div><div><font face="Andale Mono"> car_chargesubstate = 14; // Charge INTERRUPTED</font></div><div><font face="Andale Mono"> net_req_notification(NET_NOTIFY_CHARGE);</font></div><div><font face="Andale Mono"> }</font></div><div><font face="Andale Mono"> break;</font></div></blockquote></div><div><br></div><div>PID 0xFDE0 shows 8bit value 0x63 and car_chargestate != 4 and car_chargestate != 21, then we treat that as a charge interrupted and alert appropriately.</div><div><br></div><div>Does that seem correct? I'll have to check through the logs you made to double-check.</div><div><br></div><div>Regards, Mark.</div><div><br><div><div>On 14 Apr, 2013, at 5:53 AM, Patrick Kapsch <<a href="mailto:patrick.kapsch@mac.com">patrick.kapsch@mac.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Mark,<br>Since you fixed push notifications, fully charged notification works for the Tazzari. Charge interrupt notification doesn't.<br><br>Regards,<br>Patrick<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">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<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>