<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2004, 2005, 2007 All rights reserved -->
<!-- $Id: Digitrax_TF2.xml 17977 2011-07-18 17:23:46Z zoo $ -->
<!--                                                                        -->
<!-- JMRI is free software; you can redistribute it and/or modify it under  -->
<!-- the terms of version 2 of the GNU General Public License as published  -->
<!-- by the Free Software Foundation. See the "COPYING" file for a copy     -->
<!-- of this license.                                                       -->
<!--                                                                        -->
<!-- JMRI is distributed in the hope that it will be useful, but WITHOUT    -->
<!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  -->
<!-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  -->
<!-- for more details.                                                      -->
<decoder-config xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/decoder.xsd">
  <version author="Howard G. Penny" version="1" lastUpdated="20051108"/>
  <version author="Walter Thompson wsthompson@earthlink.net" version="2" lastUpdated="20080412"/>
  <version author="Matt Harris - matthew.john.harris@gmail.com" version="3" lastUpdated="20080724"/>
  <version author="Matt Harris - matthew.john.harris@gmail.com" version="3.1" lastUpdated="20080728"/>
<!-- Version 3.1                                                    -->
<!-- Modified CV29 by removing mask settings which had been causing -->
<!-- problems. Initial tests using constant values did not work.    -->
<!-- Version 3:                                                     -->
<!-- Used Digitrax_TF4.xml version 3 as a basis                     -->
<!-- Based on input from Bob Grosh:                                 -->
<!--  * Modified CV masking on function outputs                     -->
<!--  * Corrected CV29 definition                                   -->
<!--  * Added Decoder Lock pane                                     -->
  <decoder>
    <family name="Function Only, with transponding" mfg="Digitrax">
<!-- <model model="TL1" numOuts="1" lowVersionID="250"/> -->
      <model model="TF2" numOuts="2" lowVersionID="251"/>
<!-- <model model="TF4" numOuts="4" lowVersionID="254"/> -->
    </family>
    <programming direct="byteOnly" paged="yes" register="yes" ops="no"/>
    <variables>
      <variable label="Primary Address" CV="1" comment="Short address" item="Short Address" default="03">
        <shortAddressVal/>
        <label>Primary Address</label>
        <comment>Short address</comment>
      </variable>
      <variable label="Version ID" CV="7" readOnly="yes" item="Decoder Version">
        <decVal/>
        <label>Version ID</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" readOnly="yes" item="Manufacturer" default="129">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="Decoder Lock Type" CV="16" item="Decoder Lock Type" default="0">
        <enumVal>
          <enumChoice choice="0 - Unlocked">
            <choice>0 - Unlocked</choice>
          </enumChoice>
          <enumChoice choice="1 - Motor">
            <choice>1 - Motor</choice>
          </enumChoice>
          <enumChoice choice="2 - Sound">
            <choice>2 - Sound</choice>
          </enumChoice>
          <enumChoice choice="3 - Function (1)">
            <choice>3 - Function (1)</choice>
          </enumChoice>
          <enumChoice choice="4 - Function (2)">
            <choice>4 - Function (2)</choice>
          </enumChoice>
          <enumChoice choice="5 - Function (3)">
            <choice>5 - Function (3)</choice>
          </enumChoice>
          <enumChoice choice="6 - User Defined">
            <choice>6 - User Defined</choice>
          </enumChoice>
          <enumChoice choice="7 - User Defined">
            <choice>7 - User Defined</choice>
          </enumChoice>
        </enumVal>
        <label>Decoder Lock Type</label>
      </variable>
      <variable label="Long Address" CV="17" item="Extended Address">
        <longAddressVal/>
        <label>Long Address</label>
      </variable>
      <variable label="Addressing Mode" CV="29" item="Address Format">
        <enumVal>
          <enumChoice choice="2 digit addressing" value="6">
            <choice>2 digit addressing</choice>
          </enumChoice>
          <enumChoice choice="4 digit addressing" value="38">
            <choice>4 digit addressing</choice>
          </enumChoice>
        </enumVal>
        <label>Addressing Mode</label>
      </variable>
      <variable label="Effect Generated for White Lead" CV="49" mask="XXXXXVVV" item="Effect Generated W">
        <enumVal>
          <enumChoice choice="Normal on/off">
            <choice>Normal on/off</choice>
          </enumChoice>
          <enumChoice choice="Simulated FRED">
            <choice>Simulated FRED</choice>
          </enumChoice>
          <enumChoice choice="Simulated Mars light">
            <choice>Simulated Mars light</choice>
          </enumChoice>
          <enumChoice choice="Slow Strobe">
            <choice>Slow Strobe</choice>
          </enumChoice>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Double pulse">
            <choice>Double pulse</choice>
          </enumChoice>
          <enumChoice choice="Medium pulse">
            <choice>Medium pulse</choice>
          </enumChoice>
          <enumChoice choice="Mostly on blinking off">
            <choice>Mostly on blinking off</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Generated for White Lead</label>
      </variable>
      <variable label="Effect Generated for Yellow Lead" CV="50" mask="XXXXXVVV" item="Effect Generated Y" minOut="2">
        <enumVal>
          <enumChoice choice="Normal on/off">
            <choice>Normal on/off</choice>
          </enumChoice>
          <enumChoice choice="Simulated FRED">
            <choice>Simulated FRED</choice>
          </enumChoice>
          <enumChoice choice="Simulated Mars light">
            <choice>Simulated Mars light</choice>
          </enumChoice>
          <enumChoice choice="Slow Strobe">
            <choice>Slow Strobe</choice>
          </enumChoice>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
          </enumChoice>
          <enumChoice choice="Double pulse">
            <choice>Double pulse</choice>
          </enumChoice>
          <enumChoice choice="Medium pulse">
            <choice>Medium pulse</choice>
          </enumChoice>
          <enumChoice choice="Mostly on blinking off">
            <choice>Mostly on blinking off</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Generated for Yellow Lead</label>
      </variable>
      <variable label="Decoder Lock" CV="54" mask="XVXXXXXX" item="Decoder Lock" default="1">
        <enumVal>
          <enumChoice choice="Enabled">
            <choice>Enabled</choice>
          </enumChoice>
          <enumChoice choice="Disabled">
            <choice>Disabled</choice>
          </enumChoice>
        </enumVal>
        <label>Decoder Lock</label>
      </variable>
      <variable label="CV 61" CV="61" mask="XXXXXXVV" item="CV61" default="2">
        <decVal max="3"/>
        <label>CV 61</label>
      </variable>
      <variable label="Digitrax Transponding" CV="61" mask="XXXXXXVX" item="Transponding" default="1">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Digitrax Transponding</label>
      </variable>
      <variable label="Use F0 for White Function Control" CV="61" mask="XXXXXXXV" item="F0 use" inOptions="numOuts=2">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Use F0 for White Function Control</label>
      </variable>
      <variable label="Effect Rate White Lead" CV="62" mask="XXXXXVVV" item="Effect Rate W">
        <enumVal>
          <enumChoice choice="0 fastest">
            <choice>0 fastest</choice>
          </enumChoice>
          <enumChoice choice="1">
            <choice>1</choice>
          </enumChoice>
          <enumChoice choice="2">
            <choice>2</choice>
          </enumChoice>
          <enumChoice choice="3">
            <choice>3</choice>
          </enumChoice>
          <enumChoice choice="4">
            <choice>4</choice>
          </enumChoice>
          <enumChoice choice="5">
            <choice>5</choice>
          </enumChoice>
          <enumChoice choice="6">
            <choice>6</choice>
          </enumChoice>
          <enumChoice choice="7 slowest">
            <choice>7 slowest</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Rate White Lead</label>
      </variable>
      <variable label="Effect Rate Yellow Lead" CV="63" mask="XXXXXVVV" item="Effect Rate Y" minOut="2">
        <enumVal>
          <enumChoice choice="0 fastest">
            <choice>0 fastest</choice>
          </enumChoice>
          <enumChoice choice="1">
            <choice>1</choice>
          </enumChoice>
          <enumChoice choice="2">
            <choice>2</choice>
          </enumChoice>
          <enumChoice choice="3">
            <choice>3</choice>
          </enumChoice>
          <enumChoice choice="4">
            <choice>4</choice>
          </enumChoice>
          <enumChoice choice="5">
            <choice>5</choice>
          </enumChoice>
          <enumChoice choice="6">
            <choice>6</choice>
          </enumChoice>
          <enumChoice choice="7 slowest">
            <choice>7 slowest</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Rate Yellow Lead</label>
      </variable>
      <variable label="Function Controlling White Output" CV="64" mask="XXXXXXVV" item="ControlFn" minOut="2">
        <enumVal>
          <enumChoice choice="F0 or F1">
            <choice>F0 or F1</choice>
          </enumChoice>
          <enumChoice choice="F3">
            <choice>F3</choice>
          </enumChoice>
          <enumChoice choice="F5">
            <choice>F5</choice>
          </enumChoice>
          <enumChoice choice="F9">
            <choice>F9</choice>
          </enumChoice>
        </enumVal>
        <label>Function Controlling White Output</label>
      </variable>
      <variable label="CV 64" CV="64" mask="XXXXXXVV" item="CV64">
        <decVal max="3"/>
        <label>CV 64</label>
      </variable>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="8"/>
      <factReset label="Reset All CVs except speed table" CV="8" default="9"/>
    </resets>
  </decoder>
  <pane name="Function Output">
    <column>
      <label label="Use the matrix below to determine the values for CV 61 and 64">
        <label>Use the matrix below to determine the values for CV 61 and 64</label>
      </label>
      <label label=" ">
        <label> </label>
      </label>
      <row>
        <column>
          <row>
            <label label="CV64">
              <label>CV64</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="1">
              <label>1</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="3">
              <label>3</label>
            </label>
          </row>
          <row>
            <label label="1">
              <label>1</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="3">
              <label>3</label>
            </label>
          </row>
        </column>
        <label label="   ">
          <label>   </label>
        </label>
        <column>
          <row>
            <label label="CV61">
              <label>CV61</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="1">
              <label>1</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="3">
              <label>3</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="2">
              <label>2</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
          <row>
            <label label="0">
              <label>0</label>
            </label>
          </row>
        </column>
        <label label="   ">
          <label>   </label>
        </label>
        <column>
          <row>
            <label label="White">
              <label>White</label>
            </label>
          </row>
          <row>
            <label label="F1">
              <label>F1</label>
            </label>
          </row>
          <row>
            <label label="F0">
              <label>F0</label>
            </label>
          </row>
          <row>
            <label label="F1">
              <label>F1</label>
            </label>
          </row>
          <row>
            <label label="F0">
              <label>F0</label>
            </label>
          </row>
          <row>
            <label label="F3">
              <label>F3</label>
            </label>
          </row>
          <row>
            <label label="F5">
              <label>F5</label>
            </label>
          </row>
          <row>
            <label label="F9">
              <label>F9</label>
            </label>
          </row>
          <row>
            <label label="F3">
              <label>F3</label>
            </label>
          </row>
          <row>
            <label label="F5">
              <label>F5</label>
            </label>
          </row>
          <row>
            <label label="F9">
              <label>F9</label>
            </label>
          </row>
        </column>
        <label label="   ">
          <label>   </label>
        </label>
        <column>
          <row>
            <label label="Yellow">
              <label>Yellow</label>
            </label>
          </row>
          <row>
            <label label="F2">
              <label>F2</label>
            </label>
          </row>
          <row>
            <label label="F1">
              <label>F1</label>
            </label>
          </row>
          <row>
            <label label="F2">
              <label>F2</label>
            </label>
          </row>
          <row>
            <label label="F1">
              <label>F1</label>
            </label>
          </row>
          <row>
            <label label="F4">
              <label>F4</label>
            </label>
          </row>
          <row>
            <label label="F6">
              <label>F6</label>
            </label>
          </row>
          <row>
            <label label="F10">
              <label>F10</label>
            </label>
          </row>
          <row>
            <label label="F4">
              <label>F4</label>
            </label>
          </row>
          <row>
            <label label="F6">
              <label>F6</label>
            </label>
          </row>
          <row>
            <label label="F10">
              <label>F10</label>
            </label>
          </row>
        </column>
        <label label="   ">
          <label>   </label>
        </label>
        <column>
          <row>
            <label label="Transponding">
              <label>Transponding</label>
            </label>
          </row>
          <row>
            <label label="OFF">
              <label>OFF</label>
            </label>
          </row>
          <row>
            <label label="OFF">
              <label>OFF</label>
            </label>
          </row>
          <row>
            <label label="ON">
              <label>ON</label>
            </label>
          </row>
          <row>
            <label label="ON">
              <label>ON</label>
            </label>
          </row>
          <row>
            <label label="ON">
              <label>ON</label>
            </label>
          </row>
          <row>
            <label label="ON">
              <label>ON</label>
            </label>
          </row>
          <row>
            <label label="ON">
              <label>ON</label>
            </label>
          </row>
          <row>
            <label label="OFF">
              <label>OFF</label>
            </label>
          </row>
          <row>
            <label label="OFF">
              <label>OFF</label>
            </label>
          </row>
          <row>
            <label label="OFF">
              <label>OFF</label>
            </label>
          </row>
        </column>
      </row>
      <label label=" ">
        <label> </label>
      </label>
      <row>
        <column>
          <row>
            <display item="CV64"/>
          </row>
        </column>
        <label label="   ">
          <label>   </label>
        </label>
        <column>
          <row>
            <display item="CV61"/>
          </row>
        </column>
      </row>
      <label label=" ">
        <label> </label>
      </label>
      <display item="Transponding" format="radiobuttons"/>
      <label label=" ">
        <label> </label>
      </label>
      <display item="ControlFn"/>
      <display item="F0 use" format="checkbox" tooltip="Do not check this box if 'F0 or F1' is not selected above"/>
      <label label=" ">
        <label> </label>
      </label>
      <display item="Effect Generated W"/>
      <display item="Effect Rate W"/>
      <label label=" ">
        <label> </label>
      </label>
      <display item="Effect Generated Y"/>
      <display item="Effect Rate Y"/>
    </column>
    <name>Function Output</name>
  </pane>
  <pane name="Decoder Lock">
    <column>
      <display item="Decoder Lock" format="radiobuttons"/>
      <display item="Decoder Lock Type"/>
    </column>
    <name>Decoder Lock</name>
  </pane>
</decoder-config>

