<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I've added car_doors5 with a first definition as follows:<br>
<br>
typedef struct {<br>
unsigned RearLeftDoor:1;<br>
unsigned RearRightDoor:1;<br>
unsigned Frunk:1;<br>
unsigned :1;<br>
unsigned Charging12V:1;<br>
unsigned :1;<br>
unsigned :1;<br>
unsigned :1;<br>
} car_doors5bits_t;<br>
<br>
(I also added bit field types for the doors vars)<br>
<br>
Please note the Charging12V flag now needs to be set by the vehicle
modules for the 12V reference / alert logic to work properly.<br>
<br>
This commit also includes support for the parking timer on the
Twizy.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 31.01.2013 02:57, schrieb Mark
Webb-Johnson:<br>
</div>
<blockquote
cite="mid:25B11FEA-2907-4CA5-ACF7-BF8C7A189F5E@webb-johnson.net"
type="cite">Michael,
<div><br>
</div>
<div>As the 'virtual car' originally came from the Tesla Roadster,
those bits are not really 'unused' - more accurately 'unknown'.</div>
<div><br>
</div>
<div>I guess we could mask them off, in the Tesla Roadster module,
but for the sake of 1 byte, it seems better to keep the original
Tesla Roadster data unchanged.</div>
<div><br>
</div>
<div>Regards, Mark.</div>
<div><br>
<div>
<div>On 30 Jan, 2013, at 11:44 PM, Michael Balzer wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000"> Mark,<br>
<br>
what about the unused bits in doors1..4, it seems these
are not currently in use:<br>
<br>
doors1 bit 5<br>
doors2 bits 0..2 + 5<br>
doors3 all except bit 1<br>
doors4 all except bit 2<br>
<br>
That's 19 bits we could use for new flags, or am I missing
something?<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 30.01.2013 01:16, schrieb
Mark Webb-Johnson:<br>
</div>
<blockquote
cite="mid:C68D34E8-B76B-4513-90D0-5BDC443AF017@webb-johnson.net"
type="cite">Michael,
<div><br>
</div>
<div>We have another signal:</div>
<div>
<div class="column">
<ul style="list-style-type: disc">
<li style="font-size: 12.000000pt; font-family:
'Symbol'">
<p><span style="font-size: 12.000000pt;
font-family: 'Helvetica'">unsigned char
car_doors3 [bit 1] </span></p>
<p><span style="font-size: 12.000000pt;
font-family: 'Helvetica'">This bit is set to
1 to indicate the vehicle is awake, and
operational, else 0. For some cars, this
would indicate that cooling systems are
working, but for most cars it should just be
set to 1 if the car is ‘awake’ in any way. </span></p>
</li>
</ul>
</div>
</div>
<div>On the roadster, that is set when the cooling pump
is on, and all systems in the car are 'alive'.</div>
<div><br>
</div>
<div>Is that suitable for this?</div>
<div><br>
</div>
<div>If not, it is probably best to include a new
car_door5 (which we need anyway for rear-left,
rear-right door bits) and include a bit on that to
signify 12V battery charging.</div>
<div><br>
</div>
<div>Regards, Mark.</div>
<div><br>
<div>
<div>On 29 Jan, 2013, at 11:45 PM, Michael Balzer
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000"> Mark,<br>
<br>
I completely misunderstood bit 3 "pilot present"
as a driver detection (seat pressure), good you
explained that now :-)<br>
<br>
I may have been unclear. I tried to use bit 4
before, but the 12V battery charge process is
decoupled from the main battery charge process.
That's for the Twizy, of course, but I suppose
that's on other cars as well, as it seems to
make sense to charge the 12V battery
independantly.<br>
<br>
I first thought about extending the doors flags
to introduce a separate "12V charging" flag, but
then thought the combination car_linevoltage +
car_chargecurrent normally implies this.<br>
<br>
But "pilot signal present" is also not quite the
same as "charging 12V"...<br>
<br>
So, would you still say we can generally use bit
3 for this, or shall I rather introduce a new
vehicle hook, as this needs to be vehicle
dependant?<br>
<br>
Thanks,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 29.01.2013
02:24, schrieb Mark Webb-Johnson:<br>
</div>
<blockquote
cite="mid:C85FCBBE-CEA8-4BF9-ABB2-894A4C9C07C1@webb-johnson.net"
type="cite">Michael,
<div><br>
</div>
<div>To determine if the car is charging or
not, the best way is:</div>
<blockquote class="webkit-indent-blockquote"
style="margin: 0 0 0 40px; border: none;
padding: 0px;">
<div>
<ul style="list-style-type: disc">
<li style="font-size: 12.000000pt;
font-family: 'Symbol'">
<p><span style="font-size:
12.000000pt; font-family:
'Helvetica'">unsigned char
car_doors1 [bit 4]<br>
This bit is set to 1 if the
vehicle is currently charging,
else 0.</span></p>
</li>
</ul>
</div>
</blockquote>
<div><br>
</div>
<div>Alternatively, if you want to pickup
"able to charge" rather than "charging":</div>
<blockquote class="webkit-indent-blockquote"
style="margin: 0 0 0 40px; border: none;
padding: 0px;">
<div>
<div class="column">
<ul style="list-style-type: disc">
<li style="font-size: 12.000000pt;
font-family: 'Symbol'">
<p><span style="font-size:
12.000000pt; font-family:
'Helvetica'">unsigned char
car_doors1 [bit 3] </span></p>
<p><span style="font-size:
12.000000pt; font-family:
'Helvetica'">This bit is set to
1 if the pilot signal is
present, else 0. This would
normally indicated that the
vehicle is connected to external
power and either charging or
ready to charge. </span></p>
</li>
</ul>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Seems a better solution than
linevoltage/current.</div>
<div><br>
</div>
<div>Regards, Mark.<br>
<div>
<div>On 29 Jan, 2013, at 5:05 AM, Michael
Balzer wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html;
charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
Done :-)<br>
<br>
Also, as the Twizy (and I suppose
other cars as well) charges the 12V
battery further on as long as it's
plugged in, I now use the plug in
status (car_linevoltage +
car_chargecurrent) to detect a 12V
charge status.<br>
<br>
After plug-out, the OVMS waits for 10
minutes (time for the 12V battery to
calm down) until taking the new ref
voltage. That will still be a bit
above the nominal voltage, but the
span should be short enough to allow
for taking a new ref even if taking
the car for the next drive soon after
charging.<br>
<br>
I hope this will work on other cars as
well without change/config, but it
will now need the car_linevoltage and
car_chargecurrent reflecting the
actual plugin status. If a car cannot
provide this info, we can introduce a
new vehicle hook for a function that
checks for a valid calibration time.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am
26.01.2013 22:05, schrieb Michael
Balzer:<br>
</div>
<blockquote
cite="mid:5104451C.8040005@expeedo.de"
type="cite">I've got a flaw in
there: as the code begins taking ref
max values right after charging
ends, the ref gets too high. After
charging my current ref is now 14.7
due to that bug, should be around
12.7. <br>
<br>
I need to factor in the voltage
decay after end of charge. I'll see
if I can get that in without
introducing a new timer variable...
<br>
<br>
@Mikeljo: "> 13" is correct (just
ensures ref-13 > 0), your change
to "> 130" is not correct, as the
ref can be much lower. <br>
...also consider using stp_l2f() for
the STAT message, see the DIAG
message for a copy source. <br>
<br>
I really should document the stp
functions... <br>
<br>
Regards, <br>
Michael <br>
<br>
<br>
Am 25.01.2013 17:16, schrieb Mark
Webb-Johnson: <br>
<blockquote type="cite">Michael, <br>
<br>
Seems like a sensible approach. <br>
<br>
Your car is now showing
"11.9,0,12.2". <br>
<br>
I'll try it in my car over the
weekend. <br>
<br>
Regards, Mark. <br>
<br>
On 25 Jan, 2013, at 9:16 PM,
Michael Balzer <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:dexter@expeedo.de"><dexter@expeedo.de></a>
wrote: <br>
<br>
<blockquote type="cite">Mark, Tom,
<br>
<br>
I just checked in the auto
calibration implementation. <br>
<br>
It works by taking the maximum
voltage reading while the car is
off and not charging as the
reference voltage, so it should
adapt to all possible
variations. <br>
<br>
Alert is triggered if current
reading is at/below ref - 1.3V,
which should fit for all cases.
<br>
<br>
The alert now also includes the
reference, and it can be queried
by the "DIAG" SMS command. It's
also now included as a new field
in the environment message
("D"). <br>
<br>
Regards, <br>
Michael <br>
<br>
<br>
Am 22.01.2013 04:19, schrieb
Mark Webb-Johnson: <br>
<blockquote type="cite">Tom, <br>
<br>
My understanding is that the
2.x cars work the same way.
The 12V battery is just for
emergency systems. <br>
<br>
Presumably if the main pack
fails (fuse blows, whatever),
the 1.5 cars have no way of
running hazard warning lights,
brake lights, etc. <br>
<br>
It would still be useful to
see the stability of that 12V
line, on the v1.5 Tesla
Roadsters. <br>
<br>
Regards, Mark. <br>
<br>
On 21 Jan, 2013, at 12:48 AM,
Tom Saxton <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:tom@idleloop.com"><tom@idleloop.com></a> wrote: <br>
<br>
<blockquote type="cite">on
1/19/13 10:08 PM, Mark
Webb-Johnson wrote: <br>
<br>
<blockquote type="cite">If
anyone has a 1.x roadster
with a v2 hardware module,
and has recently <br>
parked it for some days,
it would be helpful if you
could send me the <br>
date/time range and your
vehicleid. <br>
</blockquote>
I don't think the v1.5
Roadster has a 12V battery.
It's my understanding <br>
that it uses a DC-to-DC
converter on one of the ESS
sheets to power the 12V <br>
systems when the car is off.
<br>
<br>
Tom <br>
<br>
<br>
_______________________________________________
<br>
OvmsDev mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
<br>
</blockquote>
_______________________________________________
<br>
OvmsDev mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
<br>
</blockquote>
-- <br>
Michael Balzer * Paradestr. 8 *
D-42107 Wuppertal <br>
Fon 0202 / 272 2201 * Handy 0176
/ 206 989 26 <br>
<br>
<dexter.vcf>_______________________________________________
<br>
OvmsDev mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
<br>
</blockquote>
_______________________________________________
<br>
OvmsDev mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
<br>
</blockquote>
<br>
<br>
<fieldset
class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</div>
<span><dexter.vcf></span>_______________________________________________<br>
OvmsDev mailing list<br>
<a moz-do-not-send="true"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</div>
<span><dexter.vcf></span>_______________________________________________<br>
OvmsDev mailing list<br>
<a moz-do-not-send="true"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</div>
<span><dexter.vcf></span>_______________________________________________<br>
OvmsDev mailing list<br>
<a moz-do-not-send="true"
href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</body>
</html>