<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2004, 2005, 2007 All rights reserved -->
<!--                                                                        -->
<!-- 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-4-15-2.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 author="Alain Le Marchand" version="3.2" lastUpdated="20140607"/>
  <!-- Version 3.2                                                    -->
  <!-- CV62 and CV63 - put a note on pane that values are opposite to -->
  <!-- what Digitrax documentation writes. CV63 inoperative in fact   -->
  <!-- Version 3.1                                                    -->
  <!-- Modified CV29 by removing mask settings which had been causing -->
  <!-- problems. Initial tests using constant values did not work.    -->
  <!-- Version 3:                                                     -->
  <!-- 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>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <variable CV="7" item="Decoder Version" readOnly="yes">
        <decVal/>
        <label>Version ID</label>
        <label xml:lang="it">Versione Decoder: </label>
        <label xml:lang="fr">Version décodeur: </label>
        <label xml:lang="de">Decoder Version: </label>
      </variable>
      <variable CV="8" readOnly="yes" item="Manufacturer" default="129">
        <decVal/>
        <label>Manufacturer ID</label>
        <label xml:lang="it">ID Costruttore: </label>
        <label xml:lang="fr">ID constructeur: </label>
        <label xml:lang="de">Hersteller ID: </label>
      </variable>
      <variable CV="16" item="Decoder Lock Type" default="0">
        <enumVal>
          <enumChoice choice="0 - Unlocked">
            <choice>0 - Unlocked</choice>
            <choice xml:lang="it">0 - Non Bloccato</choice>
          </enumChoice>
          <enumChoice choice="1 - Motor">
            <choice>1 - Motor</choice>
            <choice xml:lang="it">1 - Motore</choice>
          </enumChoice>
          <enumChoice choice="2 - Sound">
            <choice>2 - Sound</choice>
            <choice xml:lang="it">2 - Suono</choice>
          </enumChoice>
          <enumChoice choice="3 - Function (1)">
            <choice>3 - Function (1)</choice>
            <choice xml:lang="it">3 - Funzione(1)</choice>
          </enumChoice>
          <enumChoice choice="4 - Function (2)">
            <choice>4 - Function (2)</choice>
            <choice xml:lang="it">4 - Funzione(2)</choice>
          </enumChoice>
          <enumChoice choice="5 - Function (3)">
            <choice>5 - Function (3)</choice>
            <choice xml:lang="it">5 - Funzione(3)</choice>
          </enumChoice>
          <enumChoice choice="6 - User Defined">
            <choice>6 - User Defined</choice>
            <choice xml:lang="it">6 - definita dall'utente</choice>
          </enumChoice>
          <enumChoice choice="7 - User Defined">
            <choice>7 - User Defined</choice>
            <choice xml:lang="it">7 - definita dall'utente</choice>
          </enumChoice>
        </enumVal>
        <label>Decoder Lock Type</label>
        <label xml:lang="it">Tipo Blocco decoder</label>
      </variable>
      <variable CV="49" mask="XXXXXVVV" item="Effect Generated W">
        <enumVal>
          <enumChoice choice="Normal on/off">
            <choice>Normal on/off</choice>
            <choice xml:lang="it">On-Off Normale</choice>
          </enumChoice>
          <enumChoice choice="Simulated FRED">
            <choice>Simulated FRED</choice>
            <choice xml:lang="it">FRED Simulato (Fine treno)</choice>
          </enumChoice>
          <enumChoice choice="Simulated Mars light">
            <choice>Simulated Mars light</choice>
            <choice xml:lang="it">Luci Mars Simulate</choice>
          </enumChoice>
          <enumChoice choice="Slow Strobe">
            <choice>Slow Strobe</choice>
            <choice xml:lang="it">Strobe lento</choice>
          </enumChoice>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
            <choice xml:lang="it">SIngolo impulso</choice>
          </enumChoice>
          <enumChoice choice="Double pulse">
            <choice>Double pulse</choice>
            <choice xml:lang="it">Doppio impulso</choice>
          </enumChoice>
          <enumChoice choice="Medium pulse">
            <choice>Medium pulse</choice>
            <choice xml:lang="it">Impulso Medio</choice>
          </enumChoice>
          <enumChoice choice="Mostly on blinking off">
            <choice>Mostly on blinking off</choice>
            <choice xml:lang="it">On Accesa Off lampeggio</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Generated for White Lead</label>
        <label xml:lang="it">Effetti generati per luce Bianca frontale</label>
      </variable>
      <variable CV="50" mask="XXXXXVVV" item="Effect Generated Y" minOut="2">
        <enumVal>
          <enumChoice choice="Normal on/off">
            <choice>Normal on/off</choice>
            <choice xml:lang="it">On-Off Normale</choice>
          </enumChoice>
          <enumChoice choice="Simulated FRED">
            <choice>Simulated FRED</choice>
            <choice xml:lang="it">FRED Simulato (Fine treno)</choice>
          </enumChoice>
          <enumChoice choice="Simulated Mars light">
            <choice>Simulated Mars light</choice>
            <choice xml:lang="it">Luci Mars Simulate</choice>
          </enumChoice>
          <enumChoice choice="Slow Strobe">
            <choice>Slow Strobe</choice>
            <choice xml:lang="it">Strobe lento</choice>
          </enumChoice>
          <enumChoice choice="Single pulse">
            <choice>Single pulse</choice>
            <choice xml:lang="it">SIngolo impulso</choice>
          </enumChoice>
          <enumChoice choice="Double pulse">
            <choice>Double pulse</choice>
            <choice xml:lang="it">Doppio impulso</choice>
          </enumChoice>
          <enumChoice choice="Medium pulse">
            <choice>Medium pulse</choice>
            <choice xml:lang="it">Impulso Medio</choice>
          </enumChoice>
          <enumChoice choice="Mostly on blinking off">
            <choice>Mostly on blinking off</choice>
            <choice xml:lang="it">On Accesa Off lampeggio</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Generated for Yellow Lead</label>
        <label xml:lang="it">Effetti generati per luce Gialla frontale</label>
      </variable>
      <variable CV="54" mask="XVXXXXXX" item="Decoder Lock" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
        <label>Decoder Lock</label>
        <label xml:lang="it">Blocco decoder</label>
      </variable>
      <variable CV="61" mask="XXXXXXVV" item="CV61" default="2">
        <decVal max="3"/>
        <label>CV 61</label>
      </variable>
      <variable CV="61" mask="XXXXXXVX" item="Transponding" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>Digitrax Transponding</label>
        <label xml:lang="it">Tranponding Digitrax</label>
      </variable>
      <variable CV="61" mask="XXXXXXXV" item="F0 use" inOptions="numOuts=2">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>Use F0 for White Function Control</label>
        <label xml:lang="it">Usa F0 per controllo funzioni Bianco</label>
      </variable>
      <variable CV="62" mask="XXXXXVVV" item="Effect Rate W">
        <enumVal>
          <enumChoice choice="0 fastest">
            <choice>0 fastest</choice>
            <choice xml:lang="it">0 velocissimo</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>
            <choice xml:lang="it">7 lentissimo</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Rate White Lead</label>
        <label xml:lang="it">Velocità Effetti Bianco di testa</label>
      </variable>
      <variable CV="63" mask="XXXXXVVV" item="Effect Rate Y" minOut="2">
        <enumVal>
          <enumChoice choice="0 fastest">
            <choice>0 fastest</choice>
            <choice xml:lang="it">0 velocissimo</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>
            <choice xml:lang="it">7 lentissimo</choice>
          </enumChoice>
        </enumVal>
        <label>Effect Rate Yellow Lead</label>
        <label xml:lang="it">Velocità Effetti Giallo di testa</label>
      </variable>
      <variable CV="64" mask="XXXXXXVV" item="ControlFn" minOut="2">
        <enumVal>
          <enumChoice choice="F0 or F1">
            <choice>F0 or F1</choice>
            <choice xml:lang="it">F0 o 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>
        <label xml:lang="it">Funzioni per controllare uscita Luce Bianca</label>
      </variable>
      <variable 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">
        <label>Reset All CVs</label>
        <label xml:lang="it">Reset delle CV ai valori di fabbrica</label>
      </factReset>
      <factReset label="Reset All CVs except speed table" CV="8" default="9">
        <label>Reset All CVs except speed table</label>
        <label xml:lang="it">Reset delle CV salvo Tabella Velocità ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <column>
      <label>
        <text>Use the matrix below to determine the values for CV 61 and 64</text>
        <text xml:lang="it">Usa la matrice sotto per determinare valori per CV 61 e CV 64</text>
      </label>
      <label>
        <text> </text>
      </label>
      <row>
        <column>
          <row>
            <label>
              <text>CV64</text>
            </label>
          </row>
          <separator/>          
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>1</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>3</text>
            </label>
          </row>
          <row>
            <label>
              <text>1</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>3</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>
        <separator/>
        <label>
          <text>   </text>
        </label>        
        <column>
          <row>
            <label>
              <text>CV61</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>1</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>3</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>2</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
          <row>
            <label>
              <text>0</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>
        <separator/> 
        <label>
          <text>   </text>
        </label>               
        <column>
          <row>
            <label>
              <text>White</text>
              <text xml:lang="it">Bianco</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>F1</text>
            </label>
          </row>
          <row>
            <label>
              <text>F0</text>
            </label>
          </row>
          <row>
            <label>
              <text>F1</text>
            </label>
          </row>
          <row>
            <label>
              <text>F0</text>
            </label>
          </row>
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F5</text>
            </label>
          </row>
          <row>
            <label>
              <text>F9</text>
            </label>
          </row>
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F5</text>
            </label>
          </row>
          <row>
            <label>
              <text>F9</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>   
        <column>
          <row>
            <label>
              <text>Yellow</text>
              <text xml:lang="it">Giallo</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>F2</text>
            </label>
          </row>
          <row>
            <label>
              <text>F1</text>
            </label>
          </row>
          <row>
            <label>
              <text>F2</text>
            </label>
          </row>
          <row>
            <label>
              <text>F1</text>
            </label>
          </row>
          <row>
            <label>
              <text>F4</text>
            </label>
          </row>
          <row>
            <label>
              <text>F6</text>
            </label>
          </row>
          <row>
            <label>
              <text>F10</text>
            </label>
          </row>
          <row>
            <label>
              <text>F4</text>
            </label>
          </row>
          <row>
            <label>
              <text>F6</text>
            </label>
          </row>
          <row>
            <label>
              <text>F10</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>    
        <column>
          <row>
            <label>
              <text>Green</text>
              <text xml:lang="it">Verde</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F2</text>
            </label>
          </row>
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F2</text>
            </label>
          </row>
          <row>
            <label>
              <text>F5</text>
            </label>
          </row>
          <row>
            <label>
              <text>F7</text>
            </label>
          </row>
          <row>
            <label>
              <text>F11</text>
            </label>
          </row>
          <row>
            <label>
              <text>F5</text>
            </label>
          </row>
          <row>
            <label>
              <text>F7</text>
            </label>
          </row>
          <row>
            <label>
              <text>F11</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>      
        <column>
          <row>
            <label>
              <text>Violet</text>
              <text xml:lang="it">Viola</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>F4</text>
            </label>
          </row>
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F4</text>
            </label>
          </row>
          <row>
            <label>
              <text>F3</text>
            </label>
          </row>
          <row>
            <label>
              <text>F6</text>
            </label>
          </row>
          <row>
            <label>
              <text>F8</text>
            </label>
          </row>
          <row>
            <label>
              <text>F12</text>
            </label>
          </row>
          <row>
            <label>
              <text>F6</text>
            </label>
          </row>
          <row>
            <label>
              <text>F8</text>
            </label>
          </row>
          <row>
            <label>
              <text>F12</text>
            </label>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>
        <separator/>  
        <label>
          <text>   </text>
        </label>              
        <column>
          <row>
            <label>
              <text>Transponding</text>
              <text xml:lang="it">Transponding</text>
            </label>
          </row>
          <separator/>              
          <row>
            <label>
              <text>OFF</text>
            </label>
          </row>
          <row>
            <label>
              <text>OFF</text>
            </label>
          </row>
          <row>
            <label>
              <text>ON</text>
            </label>
          </row>
          <row>
            <label>
              <text>ON</text>
            </label>
          </row>
          <row>
            <label>
              <text>ON</text>
            </label>
          </row>
          <row>
            <label>
              <text>ON</text>
            </label>
          </row>
          <row>
            <label>
              <text>ON</text>
            </label>
          </row>
          <row>
            <label>
              <text>OFF</text>
            </label>
          </row>
          <row>
            <label>
              <text>OFF</text>
            </label>
          </row>
          <row>
            <label>
              <text>OFF</text>
            </label>
          </row>
        </column>
      </row>
      <label>
        <text> </text>
      </label>
      <row>
        <column>
          <row>
            <display item="CV64"/>
          </row>
        </column>
        <label>
          <text>   </text>
        </label>
        <column>
          <row>
            <display item="CV61"/>
          </row>
        </column>
      </row>
      <label>
        <text> </text>
      </label>
      <separator/>
      <label>
        <text> </text>
      </label>
      <label>
        <text>Or use the following choices to select values for CV 61 and 64</text>
        <text xml:lang="it">Or use the following choices to select values for CV 61 and 64</text>
      </label>
      <label>
        <text> </text>
      </label>           
      <display item="Transponding" format="radiobuttons"/>
      <label>
        <text> </text>
      </label>
      <display item="ControlFn">
        <tooltip>Refer to table above for full function mapping</tooltip>
        <tooltip xml:lang="it">Refer to table above for full function mapping</tooltip>
      </display>      
      <display item="F0 use" format="checkbox" tooltip="Do not check this box if 'F0 or F1' is not selected above">
        <tooltip>Do not check this box if 'F0 or F1' is not selected above</tooltip>
        <tooltip xml:lang="it">Non spuntare questo box se 'F0 o F1' non è stato selezionato</tooltip>
      </display>
      <label>
        <text> </text>
      </label>
      <separator/>
      <label>
        <text> </text>
      </label>
      <display item="Effect Generated W"/>
      <display item="Effect Generated Y"/>
      <label>
        <text> </text>
      </label>
      <display item="Effect Rate W">
          <label>Effect Rate White and Yellow Leads</label>
          <tooltip>0-fastest / 7-slowest is confirmed - Digitrax doc. not up-to-date</tooltip>
      </display>
      <label>
        <text> </text>
      </label>        
      <display item="Effect Rate Y">
          <label>Effect Rate Yellow Lead (deprecated)</label>
          <tooltip>Ineffective in recent versions of this decoder - Digitrax doc. not up-to-date</tooltip>
      </display>  
    </column>
    <name>Function Output</name>
    <name xml:lang="it">Uscita Funzione</name>
  </pane>
  <pane>
    <column>
      <display item="Decoder Lock" format="radiobuttons"/>
      <display item="Decoder Lock Type"/>
    </column>
    <name>Decoder Lock</name>
    <name xml:lang="it">Blocco Decoder</name>
  </pane>
</decoder-config>
