The original def uses the correct encoding for the degree symbol as in:
Code:
units="°C"
For a switch definition you can have one of more switch states, but only one state can be selected at any given time. For example from the CarBerry def with 13 options:
Code:
<table type="Switch" name="Anti-Lag - Input Control" category="CarBerry - Anti-Lag" sizey="6">
<description>This designates the input that controls Anti-Lag.</description>
<state name="Anti-Lag Always Enabled - Must Enable Anti-Lag in Table Above." data="27 4C 27 4C 27 4C" />
<state name="Anti-Lag with Defogger Switch(ECU pin A3)" data="2B 10 08 94 00 4C" />
<state name="Anti-Lag with Headlight switch(ECU pin A17)" data="2B 02 08 94 00 4C" />
<state name="Anti-Lag with TID switch(ECU pin E1) - Be sure Auto-Trans Logic is Disabled under Miscellaneous" data="2B 08 08 96 00 4C" />
<state name="Anti-Lag with Intercooler Auto-Wash Switch(ECU pin B12) - Requires Compatible ECU" data="2A 20 08 9B 00 4C" />
<state name="Anti-Lag with A/C Switch(ECU pin A2, cannot use stock A/C button)" data="2B 08 08 94 00 4C" />
<state name="Anti-Lag with Blower Switch(ECU pin A9)" data="2B 04 08 94 00 4C" />
<state name="Inverted - Anti-Lag with Defogger Switch(ECU pin A3)" data="2A 10 08 94 00 4C" />
<state name="Inverted - Anti-Lag with Headlight switch(ECU pin A17)" data="2A 02 08 94 00 4C" />
<state name="Inverted - Anti-Lag with TID switch(ECU pin E1) - Be sure Auto-Trans Logic is Disabled under Miscellaneous" data="2A 08 08 96 00 4C" />
<state name="Inverted - Anti-Lag with Intercooler Auto-Wash Switch(ECU pin B12) - Requires Compatible ECU" data="2B 20 08 9B 00 4C" />
<state name="Inverted - Anti-Lag with A/C Switch(ECU pin A2, cannot use stock A/C button)" data="2A 08 08 94 00 4C" />
<state name="Inverted - Anti-Lag with Blower Switch(ECU pin A9)" data="2A 04 08 94 00 4C" />
</table>
The address is later defined in the ROM specifc section as:
Code:
<table name="Anti-Lag - Input Control" storageaddress="0xAF34" />
So your MAF limit switch has only two states but you need to set it at two different addresses.
Code:
<table type="Switch" name="MAF Threshold 1" category="Miscellaneous Thresholds" sizey="4">
<description>This changes the limit of the MAF.</description>
<state name="1024kg (turtle mode)" data="27 4C 27 4C" />
<state name="2048kg (hare mode)" data="2B 10 08 94" />
<table type="Switch" name="MAF Threshold 2" category="Miscellaneous Thresholds" sizey="4">
<description>This changes the limit of the MAF.</description>
<state name="1024kg (turtle mode)" data="27 4C 27 4C" />
<state name="2048kg (hare mode)" data="2B 10 08 94" />
I used some arbitrary data, set as you require then set the 'sizey' attribute to the correct length of the data.Then in your ROM specific def section just add the addresses to change:
Code:
<table name="MAF Threshold 1" storageaddress="0x3D8A2" />
<table name="MAF Threshold 2" storageaddress="0x3D8C6" />