Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Speed limiter rework
- existing speed limiter def : removed separate "km/h" template, instead
use multiple scalings
- add A2L based mVSPCT2,mVSPRC2 cut/restore limiter to templates and
6Y303 (untested)
  • Loading branch information
fenugrec committed Sep 9, 2018
1 parent c3ea3be commit d1ceb3f
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 27 deletions.
2 changes: 0 additions & 2 deletions 6y300.xml
Expand Up @@ -75,8 +75,6 @@
</table>
<table name="Speed Limiter" storageaddress="0x5074" />

<table name="Speed Limiter (km/h)" storageaddress="0x5074" />

<table name="Throttle Open" storageaddress="0x644c">
<table type="X Axis" storageaddress="0x794a" />
<table type="Y Axis" storageaddress="0x6e0b" />
Expand Down
11 changes: 6 additions & 5 deletions 6y303.xml
Expand Up @@ -54,10 +54,9 @@
<table type="Y Axis" storageaddress="0x77b9" />
</table>

<table name="Rev Limit (Fuel Cut)" storageaddress="0x5062">
</table>
<table name="No Load Rev Limit (Fuel Cut)" storageaddress="0x5066">
</table>
<table name="Rev Limit (Fuel Cut)" storageaddress="0x5062" />
<table name="No Load Rev Limit (Fuel Cut)" storageaddress="0x5066" />

<table name="VIAS Setpoints" storageaddress="0x4e18">
</table>
<table name="MAF" storageaddress="0x7992">
Expand All @@ -73,7 +72,9 @@
<table name="Fuel Injection Multiplier" storageaddress="0x500c">
</table>
<table name="Speed Limiter" storageaddress="0x50b2" />
<table name="Speed Limiter (km/h)" storageaddress="0x50b2" />
<table name="mVSPCT2 Speed Limiter (cut)" storageaddress="0x4e43"/>
<table name="mVSPRC2 Speed Limiter (restore)" storageaddress="0x4e4e"/>


<table name="Throttle Open" storageaddress="0x85fc">
<table type="X Axis" storageaddress="0x88d0" />
Expand Down
1 change: 0 additions & 1 deletion 8U523.xml
Expand Up @@ -55,7 +55,6 @@
</table>

<table name="Speed Limiter" storageaddress="0x5440" />
<table name="Speed Limiter (km/h)" storageaddress="0x5440" />

<table name="No Load Rev Limit (Fuel Cut)" storageaddress="0x53a2">
</table>
Expand Down
2 changes: 1 addition & 1 deletion 9J074.xml
Expand Up @@ -61,7 +61,7 @@
<table name="Fuel Injection Multiplier" storageaddress="0x4FD0">
</table>
<table name="Speed Limiter" storageaddress="0x5074" />
<table name="Speed Limiter (km/h)" storageaddress="0x5074" />

<table name="Throttle Open" storageaddress="0x85dc">
<table type="X Axis" storageaddress="0x88b0" />
<table type="Y Axis" storageaddress="0x8820" />
Expand Down
1 change: 0 additions & 1 deletion CE410.xml
Expand Up @@ -45,7 +45,6 @@
<table name="Idle Target C" storageaddress="0x884b" />

<table name="Speed Limiter" storageaddress="0x63aa" />
<table name="Speed Limiter (km/h)" storageaddress="0x63aa" />

<checksum type="std" start="0" end="0x7FFFF" sumloc="0x6500" xorloc="0x64F8" />

Expand Down
1 change: 0 additions & 1 deletion CE860.xml
Expand Up @@ -58,7 +58,6 @@
<table name="Idle Target C" storageaddress="0x83ab" />

<table name="Speed Limiter" storageaddress="0x61b2" />
<table name="Speed Limiter (km/h)" storageaddress="0x61b2" />

<table name="Throttle Open" storageaddress="0x7568">
<table type="Y Axis" storageaddress="0x9bc4" />
Expand Down
2 changes: 1 addition & 1 deletion M5113.xml
Expand Up @@ -58,7 +58,7 @@
<table name="No Load Rev Limit (Fuel Cut)" storageaddress="0x4a2a">
</table>

<table name="Speed Limiter (km/h)" storageaddress="0x4aa6" />
<table name="Speed Limiter" storageaddress="0x4aa6" />

<table name="Torque Management" storageaddress="0x71e0">
<table type="X Axis" storageaddress="0x77fe" />
Expand Down
2 changes: 1 addition & 1 deletion am900.xml
Expand Up @@ -71,7 +71,7 @@
<table name="Fuel Injection Multiplier" storageaddress="0x6428">
</table>

<table name="Speed Limiter (km/h)" storageaddress="0x64ea" />
<table name="Speed Limiter" storageaddress="0x64ea" />

<checksum type="std" start="0" end="0x7FFFF" sumloc="0x6640" xorloc="0x6638" />

Expand Down
2 changes: 1 addition & 1 deletion aq806.xml
Expand Up @@ -58,7 +58,7 @@
<table name="No Load Rev Limit (Fuel Cut)" storageaddress="0x4a44">
</table>

<table name="Speed Limiter (km/h)" storageaddress="0x4ac0" />
<table name="Speed Limiter" storageaddress="0x4ac0" />

<table name="Torque Management" storageaddress="0x71f8">
<table type="X Axis" storageaddress="0x7816" />
Expand Down
1 change: 0 additions & 1 deletion cd700.xml
Expand Up @@ -51,7 +51,6 @@
<table name="Idle Target C" storageaddress="0x845f" />

<table name="Speed Limiter" storageaddress="0x6268" />
<table name="Speed Limiter (km/h)" storageaddress="0x6268" />

<table name="Rev Limit (Fuel Cut)" storageaddress="0x61dc">
</table>
Expand Down
41 changes: 29 additions & 12 deletions table_templates
Expand Up @@ -5,6 +5,11 @@
<flashmethod>nisprog</flashmethod>
</romid>


<!-- Some scalings. Names inspired from ZB060 A2L. Haven't managed to get global scalings to work... -->
<scaling name="u8speed_COMP_0007" units="km/h" expression="x*2" to_byte="x/2" format="0.0" fineincrement="2" coarseincrement="10" />
<scaling name="u8speed_COMP_0007_imp" units="mph" expression="x*2/1.6" to_byte="x*1.6/2" format="0.0" fineincrement="2" coarseincrement="10" />

<table type="3D" name="Timing1" category="Ignition Timing" storagetype="uint8" endian="big" sizex="16" sizey="16" userlevel="1" logparam="?">
<scaling units="NA" expression="x" to_byte="x" format="0" fineincrement=".2" coarseincrement="1" />
<table type="X Axis" name="BFS" storagetype="uint8" endian="big" logparam="?">
Expand Down Expand Up @@ -561,26 +566,38 @@
</table>

<table type="2D" name="Speed Limiter" category="Limiters" storagetype="uint16" endian="big" sizey="1" userlevel="1">
<scaling units="" expression="x*.0621371" to_byte="x/.0621371" format="0.00" fineincrement="1" coarseincrement="10" />
<table type="Static Y Axis" name="MPH" sizey="2">
<data>K Value</data>
</table>
<description>Speed Limiter</description>
<scaling name="SI" units="km/h" expression="x*0.1" to_byte="x/0.1" format="0.0" fineincrement="1" coarseincrement="10" />
<scaling name="imp" units="mph" expression="x*.0621371" to_byte="x/.0621371" format="0.00" fineincrement="1" coarseincrement="10" />
<table type="Static Y Axis" name="Limit" sizey="1">
<data>speed</data>
</table>
<description>Speed Limiter</description>
</table>

<table type="2D" name="Speed Limiter (km/h)" category="Limiters" storagetype="uint16" endian="big" sizey="1" userlevel="1">
<scaling units="" expression="x*0.1" to_byte="x/0.1" format="0.0" fineincrement="1" coarseincrement="10" />
<table type="Static Y Axis" name="km/h" sizey="2">
<data>K Value</data>
</table>
<description>Speed Limiter</description>
<table type="2D" name="mVSPCT2 Speed Limiter (cut)" category="Limiters" storagetype="uint8" endian="big" sizey="1" userlevel="1" >
<!-- scalings from ZB060 A2L, seem to be valid for all 8-bit (low resolution) vehicle speed params -->
<scaling name="SI" units="km/h" expression="x*2" to_byte="x/2" format="0.0" fineincrement="2" coarseincrement="10" />
<scaling name="imp" units="mph" expression="x*2/1.6" to_byte="x*1.6/2" format="0.0" fineincrement="1" coarseincrement="10" />
<table type="Static Y Axis" name="fuel cut" sizey="1">
<data>speed</data>
</table>
<description>Speed Limiter. Some ROMs have two speed limiting mechanisms (mVSPCT2 and the other generically named "speed limiter")</description>
</table>

<table type="2D" name="mVSPRC2 Speed Limiter (restore)" category="Limiters" storagetype="uint8" endian="big" sizey="1" userlevel="1">
<!-- scaling from ZB060 A2L ("COMP_0007"), seems to be used for all 8-bit (low resolution) vehicle speed params -->
<scaling name="km" units="km/h" expression="x*2" to_byte="x/2" format="0.0" fineincrement="2" coarseincrement="10" />
<scaling name="mp" units="mph" expression="x*2/1.6" to_byte="x*1.6/2" format="0.0" fineincrement="1" coarseincrement="10" />
<table type="Static Y Axis" name="fuel restore" sizey="1">
<data>speed</data>
</table>
<description>Speed Limiter. Some ROMs have two speed limiting mechanisms (mVSPCT2 and the other generically named "speed limiter"). This speed (restore) must be lower than cut</description>
</table>

<table type="2D" name="Throttle Rev Limit" category="Limiters" storagetype="uint16" endian="big" sizey="1" userlevel="1">
<scaling units="Engine Speed (RPM)" expression="x*.781300" to_byte="x/.781300" format="#" fineincrement="50" coarseincrement="100" />
<table type="Static Y Axis" name="Rev Limit Throttle Cut" sizey="1">
<data>Throttle Cut</data>

</table>
<description>Engine speed at which the rev limiter is engaged and disengaged, by closing the throttle. </description>
</table>
Expand Down

0 comments on commit d1ceb3f

Please sign in to comment.