Page 1 of 1

XML Formatting confusion

PostPosted: Fri Mar 10, 2006 9:03 am
by New2Scoobs
Epifan, could you (or anyone else that knows) post a few real life examples of how to correctly format statements in XML files.
I don't have a clue how (or when) to use the BigEndian feature.

Also, when you release updates with new & improved features that require us to modify of our XML files could you please also provide some real life samples of an XML file utilising the new feature(s)

We are not all programers you know! :wink:

Thanks

PostPosted: Fri Mar 10, 2006 12:37 pm
by qoncept
For Subaru ECUs you should pretty much always be using big endian.

PostPosted: Sat Mar 11, 2006 12:23 pm
by New2Scoobs
qoncept wrote:For Subaru ECUs you should pretty much always be using big endian.


OK, so that answers WHEN to use BigEndian - Now all I need to know is HOW to use BigEndian in my XML lines :)

PostPosted: Sun Mar 12, 2006 12:11 am
by qoncept
I'm not sure exactly what you have, but any time you're using [byte0] and [byte1], reverse them. I'm not sure how much you know, but big and little endian tells the application what order to read the bytes in.

PostPosted: Sun Mar 12, 2006 12:24 am
by epifan
Add <default_reverse_bytes value="True"/> tag in <config> tag to change ecuEdit for work with big-endian numeric representation

http://forums.openecu.org/viewtopic.php?p=2591

PostPosted: Sun Mar 12, 2006 9:27 am
by New2Scoobs
epifan wrote:Add <default_reverse_bytes value="True"/> tag in <config> tag to change ecuEdit for work with big-endian numeric representation

http://forums.openecu.org/viewtopic.php?p=2591


OK that makes sense now. But after adding the above tag my RPM row and Engine load column data is now incorrect. Instead of RPM data going from 800,1200,1600 etc it is now listed as 204800, 307200, 409600.
Below are a couple of lines from my XML file - what needs to change to get the RPM & Engine load data correct?

<map name="Low Det Fuel Map" type="3">
<rows count="18" offset="#292b5" power="2" format="%.0f" func_2val="[value]*50" func_val2="[value]/50" desc="RPM"/>
<cols count="16" offset="#292d9" power="2" format="%.4f" func_2val="[value]/8192" func_val2="[value]*8192" desc="Load (Air/Cylinder charge)"/>
<data offset="#292fc" power="1" format="%.2f" func_2val="14.7/(1 + ([value] / 128))" func_val2="(14.7*128)/[value]-128" color_dir="1" inc_dir="0" desc="Air/Fuel Ratio"/>
</map>

PostPosted: Sun Mar 12, 2006 11:01 pm
by xswrex
New2Scoobs wrote:func_2val="[value]/256*50"


that should do the trick

PostPosted: Mon Apr 10, 2006 11:28 am
by x99percent
xswrex wrote:
New2Scoobs wrote:func_2val="[value]/256*50"


that should do the trick

...and what about the load?

[value]/8192 no longer works with <default_reverse_bytes value="True"/>

PostPosted: Mon Apr 10, 2006 10:21 pm
by xswrex
x99percent wrote:
xswrex wrote:
New2Scoobs wrote:func_2val="[value]/256*50"


that should do the trick

...and what about the load?

[value]/8192 no longer works with <default_reverse_bytes value="True"/>


it should work! something else maybe is out of order???

In the functions toRPM=[value]/5.12
I use only multipliers
toRPM=[value]*0.195312500000000

same logic for load [value]/8192 should work but in any case try this
toLoad=[value]*0.000122070312500

PostPosted: Tue Apr 11, 2006 3:59 am
by x99percent
xswrex wrote:
x99percent wrote:
xswrex wrote:
New2Scoobs wrote:func_2val="[value]/256*50"


that should do the trick

...and what about the load?

[value]/8192 no longer works with <default_reverse_bytes value="True"/>


it should work! something else maybe is out of order???

In the functions toRPM=[value]/5.12
I use only multipliers
toRPM=[value]*0.195312500000000

same logic for load [value]/8192 should work but in any case try this
toLoad=[value]*0.000122070312500


If I turn off reverse bytes for that axis only (reverse_bytes="False"), then [value]/8192 works perfectly.

PostPosted: Tue Apr 11, 2006 5:01 am
by epifan
x99percent wrote:If I turn off reverse bytes for that axis only (reverse_bytes="False"), then [value]/8192 works perfectly.

it's not right! [value]/8192 is correct formula. Imho, you must shift offset to Load sequence by 1 byte.