<?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: Kuehn_ZTC217.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="Bob Blackwell afticarr@sympatico.ca)" version="1" lastUpdated="20060812"/>
<!-- ZTC Speed Stabilized / WhisperDrive decoder -->
  <decoder>
    <family name="ZTC WhisperDrive" mfg="Kuehn" lowVersionID="0" highVersionID="255">
      <model model="ZTC217" numOuts="2">
        <output name="1" label="White"/>
        <output name="2" label="Yellow"/>
      </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="157">
        <decVal/>
        <label>Manufacturer ID</label>
      </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="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 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"/>
      <constant label="F3 controls output 5" minOut="5" default="1"/>
      <constant label="F4 controls output 6" minOut="6" default="1"/>
    </variables>
  </decoder>
  <pane name="ZTC">
    <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>

