<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Michael,<br>
<br>
Am 21.01.24 um 02:54 schrieb Michael Geddes:<br>
<blockquote type="cite"
cite="mid:CAH0p7u+HdDBMaaHqE2HV7gmoxOdzS91mKpnt=U0vTBK5RYFj2A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hey, In working trying to get ESP-IDF 5+ Working, I
came across the following fun thing that I'm trying to work out
what is going on!!
<div>This is from main/ovms_module.cpp</div>
<div>I'm not sure why we don't just go through all the words and
compare - why the masked compare for the last entry! And why
that value?? It might make sense if you masked out the final
byte ... I'm just struggling to understand.</div>
</div>
</blockquote>
<br>
From the further accesses to the last word/byte in TaskMap, I'd
guess Steve intended using the sign bit on the last byte as some
special indicator, but it's not clear to me for what purpose. It
also doesn't seem to be relevant anymore.<br>
<br>
Steve's commit message is verbose
(30d0a403a380e797f9b222b01dab8da791ab388c), and maybe you can find
some more explanation in the list archives.<br>
<br>
Regards,<br>
Michael<br>
<br>
<blockquote type="cite"
cite="mid:CAH0p7u+HdDBMaaHqE2HV7gmoxOdzS91mKpnt=U0vTBK5RYFj2A@mail.gmail.com">
<div dir="ltr">
<div>Why am I looking at it?? Well there's a new warning about
copy constructors.. and then I ran into a problem where 'Name'
is sometimes in memory that can only be accessed 32bit int
aligned (which is why the strange implementation in the first
place - I get that).</div>
<div><br>
</div>
<div>Can anybody shed any light on this?</div>
<div><br>
</div>
<div><br>
<div>class Name<br>
{.......<br>
</div>
<div> inline bool operator==(const Name& a) const<br>
{<br>
for (int i = 0; i < NAMELEN/4 - 1; ++i)<br>
if (a.words[i] != words[i]) return false;<br>
i<b>f (a.words[NAMELEN/4-1] != (words[NAMELEN/4-1]
& 0x7FFFFFFF)) return false;</b><br>
return true;<br>
}<br>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26</pre>
</body>
</html>