<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003, 2005 All rights reserved -->
<!-- $Id: ZTC_Stabilized.xml 19344 2011-12-10 06:57:23Z jacobsen $ -->
<!--                                                                        -->
<!-- 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="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" mfg="ZTC" lowVersionID="0" highVersionID="255">
      <model model="ZTC216" numOuts="2">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
      </model>
      <model model="ZTC226" numOuts="4">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
        <output name="1" label="Green"/>
        <output name="2" label="Violet"/>
      </model>
    </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="Start Volts" CV="2" item="Vstart" comment="Range 0-255">
        <decVal/>
        <label>Start Volts</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable label="Accel" CV="3" comment="Range 0-15">
        <decVal max="15"/>
        <label>Accel</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable label="Decel" CV="4" comment="Range 0-15">
        <decVal max="15"/>
        <label>Decel</label>
        <comment>Range 0-15</comment>
      </variable>
      <variable label="Vhigh" CV="5" comment="Range 0-255">
        <decVal max="255"/>
        <label>Vhigh</label>
        <comment>Range 0-255</comment>
      </variable>
      <variable label="Vmid" CV="6" comment="Range 1-13">
        <decVal min="0" max="13"/>
        <label>Vmid</label>
        <comment>Range 1-13</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="99">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label=" Analog (DC) Operation " CV="12" comment="DC Conversion Active?" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="Operate on DCC only">
            <choice>Operate on DCC only</choice>
          </enumChoice>
          <enumChoice choice="Operate on DCC and DC">
            <choice>Operate on DCC and DC</choice>
          </enumChoice>
        </enumVal>
        <label> Analog (DC) Operation </label>
        <comment>DC Conversion Active?</comment>
      </variable>
      <variable label="Extended Address (0-9999)" CV="17" item="Long Address" comment="4 digit address (Range 0-9999)">
        <longAddressVal/>
        <label>Extended Address (0-9999)</label>
        <comment>4 digit address (Range 0-9999)</comment>
      </variable>
      <variable label="Normal direction of motion" CV="29" mask="XXXXXXXV" item="Locomotive Direction">
        <enumVal>
          <enumChoice choice="Forward">
            <choice>Forward</choice>
          </enumChoice>
          <enumChoice choice="Reverse">
            <choice>Reverse</choice>
          </enumChoice>
        </enumVal>
        <label>Normal direction of motion</label>
      </variable>
      <variable label="Speed Steps" CV="29" mask="XXXXXXVX" item="Speed Step Mode" default="1">
        <enumVal>
          <enumChoice choice="14">
            <choice>14</choice>
          </enumChoice>
          <enumChoice choice="28/128 (recommended)">
            <choice>28/128 (recommended)</choice>
          </enumChoice>
        </enumVal>
        <label>Speed Steps</label>
      </variable>
      <variable label="Analog conversion mode" CV="29" mask="XXXXXVXX" default="1" item="Analog (DC) Operation">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Analog conversion mode</label>
      </variable>
      <variable label="Address Format" CV="29" mask="XXVXXXXX">
        <enumVal>
          <enumChoice choice="One byte (short) address">
            <choice>One byte (short) address</choice>
          </enumChoice>
          <enumChoice choice="Two byte (extended) address">
            <choice>Two byte (extended) address</choice>
          </enumChoice>
        </enumVal>
        <label>Address Format</label>
      </variable>
      <variable label="Static Compensation" 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 label="Dynamic Compensation" 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 label="Decay Rate" 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 label="Directional Headlights" CV="61" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="Headlights are directional and operate automatically">
            <choice>Headlights are directional and operate automatically</choice>
          </enumChoice>
          <enumChoice choice="Headlights are independently controlled (F0-Front, F4-Rear)">
            <choice>Headlights are independently controlled (F0-Front, F4-Rear)</choice>
          </enumChoice>
        </enumVal>
        <label>Directional Headlights</label>
      </variable>
      <variable label=" Kick Start " CV="65" comment="Range 0-63">
        <decVal max="63"/>
        <label> Kick Start </label>
        <comment>Range 0-63</comment>
      </variable>
<!-- Define the fixed Function-Output mapping -->
      <constant label="F1 controls output 3" minOut="3" default="1"/>
      <constant label="F2 controls output 4" minOut="4" default="1"/>
    </variables>
    <resets>
       <factReset label="Reset All CVs" CV="8" default="8"/>
    </resets>
  </decoder>
  <pane name="ZTC">
    <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>
    <name>ZTC</name>
  </pane>
</decoder-config>

