<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2005 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="Peter Ulvestad" version="3" lastUpdated="20111203"/>
  <version author="Ian Birchenough(ian@birchenough.demon.co.uk)" version="2" lastUpdated="20060521"/>
  <version author="Phil Grainger (phil.grainger@ca.com)" version="1" lastUpdated="20030805"/>
  <!--   version 3 Added factory reset.-->
  <!-- ZTC Speed Stabilized decoders -->
  <decoder>
    <family name="ZTC Speed Stabilised (B)" mfg="ZTC" lowVersionID="0" highVersionID="255">
      <model model="ZTC216B" numOuts="2">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
      </model>
      <model model="ZTC226B" numOuts="4">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
        <output name="3" label="Green"/>
        <output name="4" label="Violet"/>
      </model>
      <model model="ZTC227B" numOuts="6">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
        <output name="3" label="Green"/>
        <output name="4" label="Violet"/>
        <output name="5" label="Pink"/>
        <output name="6" label="Brown"/>
      </model>
    </family>
    <programming direct="byteOnly" paged="yes" register="yes" ops="no"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <variable CV="2" item="Vstart" comment="Range 0-255">
        <decVal/>
        <label>Start Volts</label>
        <label xml:lang="it">Volt Partenza</label>
        <label xml:lang="fr">V démarr.</label>
        <label xml:lang="de">Anfahrspannung</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable item="Accel" CV="3" comment="Range 0-15">
        <decVal max="15"/>
        <label>Accel</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable item="Decel" CV="4" comment="Range 0-15">
        <decVal max="15"/>
        <label>Decel</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable item="Vhigh" CV="5" comment="Range 0-255">
        <decVal max="255"/>
        <label>Vhigh</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable item="Vmid" CV="6" comment="Range 1-13">
        <decVal min="0" max="13"/>
        <label>Vmid</label>
        <comment>Range 1-13</comment>
      </variable>
      <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="99">
        <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>
      <!-- CV=29 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29direction.xml"/>
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29speedSteps.xml"/>
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29analog.xml"/>
      <variable item="Motor Drive Selection" CV="54" mask="XXXXXXXV" default="0">
        <enumVal>
          <enumChoice choice="WhisperDrive ON">
            <choice>WhisperDrive ON</choice>
          </enumChoice>
          <enumChoice choice="WhisperDrive OFF">
            <choice>WhisperDrive OFF</choice>
          </enumChoice>
        </enumVal>
        <label>Motor Drive Selection</label>
      </variable>
      <variable CV="55" item="Static Compensation" default="128" comment="Range 0-255">
        <decVal min="0" max="255"/>
        <label>Static Compensation</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable CV="56" item="Dynamic Compensation" default="48" comment="Range 0-255">
        <decVal min="0" max="255"/>
        <label>Dynamic Compensation</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable CV="57" item="Decay Rate" default="0" comment="Range 0-15">
        <decVal min="0" max="15"/>
        <label>Decay Rate</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable item="Directional Headlights" CV="61" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="Headlights are directional and operate automatically">
            <choice>Headlights are directional and operate automatically</choice>
            <choice xml:lang="it">Luci di testa direzionali e automatiche</choice>
          </enumChoice>
          <enumChoice choice="Headlights are independently controlled (F0-Front, F4-Rear)">
            <choice>Headlights are independently controlled (F0-Front, F4-Rear)</choice>
            <choice xml:lang="it">Luci di testa controllate indipendentemente (F0-Avanti, F4-Retro)</choice>
          </enumChoice>
        </enumVal>
        <label>Directional Headlights</label>
        <label xml:lang="it">Luci di testa direzionali</label>
      </variable>
      <xi:include href="http://jmri.org/xml/decoders/nmra/kickStart_63.xml"/>
      <!-- Define the fixed Function-Output mapping -->
      <constant item="F1 controls output 3" minOut="3" default="1"/>
      <constant item="F2 controls output 4" minOut="4" default="1"/>
      <constant item="F3 controls output 5" minOut="5" default="1"/>
      <constant item="F4 controls output 6" minOut="6" default="1"/>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="8">
         <label xml:lang="it">Reset delle CV ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <column>
      <row>
        <column>
          <display item="Static Compensation" format="hslider" label="">
            <label/>
          </display>
          <display item="Static Compensation"/>
          <display item="Dynamic Compensation" format="hslider" label="">
            <label/>
          </display>
          <display item="Dynamic Compensation"/>
          <display item="Decay Rate" format="hslider" label="">
            <label/>
          </display>
          <display item="Decay Rate"/>
        </column>
      </row>
      <separator/>
      <row>
        <column>
          <display item="Motor Drive Selection" layout="above" label="Motor Drive Selection">
            <label>Motor Drive Selection</label>
          </display>
        </column>
      </row>
    </column>
    <name>ZTC</name>
  </pane>
</decoder-config>
