<?xml version='1.0' encoding='UTF-8'?> 
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2014 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.xsd">
  <version author="Alain Le Marchand" version="1" lastUpdated="20140511"/>
  <!-- Version 1 - Initial version (Alain Le Marchand) -->
  <!-- WARNING: output names fully linked to function mapping include file - do not change independently -->
  <decoder>
    <family name="Multi-Protocol Decoder" mfg="Uhlenbrock Elektronik" lowVersionID="9" comment="Decoders not sorted (necessarily) in numerical order">
      <model model="76150" numOuts="4" numFns="14" maxMotorCurrent="1.2A" formFactor="HO" connector="PluX16" productID="76150" comment="HO-Scale, IntelliDrive Deluxe with PluX16 plug (Piko #46121)">
        <output name="1" label="F0(F)" connection="plug"/>
        <output name="2" label="F0(R)" connection="plug"/>
        <output name="3" label=". A1 ." connection="plug"/>
        <output name="4" label=". A2 ." connection="plug"/>
        <output name="Shunting" label="mode"/>
        <output name="Start/brake" label="inertia"/>
        <size length="22" width="15" height="3.8" units="mm"/>
      </model>
      <model model="76320" numOuts="2" numFns="14" maxMotorCurrent="1.20" formFactor="HO" connector="NEM652" productID="76320" comment="HO-Scale, IntelliDrive Comfort with NEM652 plug (Piko #56122)">
        <output name="1" label="F0(F)" connection="plug"/>
        <output name="2" label="F0(R)" connection="plug"/>
        <output name="Shunting" label="mode"/>
        <output name="Start/brake" label="inertia"/>
        <size length="19" width="15.4" height="5" units="mm"/>
      </model>	  
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/vStartHighMid-accelDecel.xml"/>
      <variable item="Decoder Version" CV="7" default="9" readOnly="yes">
        <decVal/>
        <label>Manufacturer Version No: </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 item="Manufacturer" CV="8" readOnly="yes" default="85">
        <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>
      <xi:include href="http://jmri.org/xml/decoders/nmra/consistAddrDirection.xml"/>
      <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/uhlenbrock/cv29analog.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv29speedTableNotUsed.xml"/>
      <!-- No function mapping -->
      <!-- <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/functionmap2outputs.xml"/>  -->
      <!-- End function mapping -->
      <!-- CV49 Uhlenbrock decoder configuration - common bits -->
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv49common.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv49dataformat.xml"/>
      <!-- CV49 specific bits for this decoder-->
      <variable item="Sound module" CV="49" default="0" mask="XXXXXXVX" include="76150">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>SUSI module</label>
        <label xml:lang="de">SUSI Modul</label>
      </variable>
      <variable item="LISSY module" CV="49" default="0" mask="XXXXXVXX" include="76150">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>LISSY module</label>
        <label xml:lang="de">LISSY Modul</label>
      </variable>
      <!-- End CV49 specifics -->
      <variable item="Function F0F options" CV="50" tooltip="min=0, max=31" default="16">
        <decVal max="31" min="0"/>
        <label>Lights output dimming</label>
        <label xml:lang="de">Dimmung Lichtausgänge</label>
      </variable>
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv51analog.xml"/>
      <variable item="EMF Option 1" CV="53" default="40">
        <decVal max="255"/>
        <label>Repetition rate</label>
        <label xml:lang="de">Wiederholrate der Motorregelung</label>
        <tooltip>Lower if the locomotive does not run smoothly</tooltip>
        <tooltip xml:lang="de">verkleinern, wenn Lok ungleichmäßig läuft</tooltip>
      </variable>
      <variable item="Motor Option 1" CV="54" mask="XXXXXXVV" default="0">
        <enumVal>
          <enumChoice choice="12 V" value="0">
            <choice>12 V</choice>
            <choice xml:lang="de">12 V</choice>			
          </enumChoice>
          <enumChoice choice="14 V" value="1">
            <choice>14 V</choice>
            <choice xml:lang="de">14 V</choice>			
          </enumChoice>
          <enumChoice choice="16 V" value="3">
            <choice>16 V</choice>
            <choice xml:lang="de">16 V</choice>			
          </enumChoice>
        </enumVal>
        <label>Adaptation for motor</label>
        <label xml:lang="de">Anpassung an Motor</label>		
      </variable>	  
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv54motorReg.xml"/>
      <variable item="EMF Option 2" CV="58" default="8">
        <decVal max="255"/>
        <label>Time slot for AD measurement</label>
        <label xml:lang="de">Zeitschlitz für AD Wandlermessung</label>
        <tooltip>Increase if loc does not run smoothly at low speeds - Decrease if the top speed is too low after CV53 has been lowered</tooltip>
        <tooltip xml:lang="de">vergrößern, wenn Lok bei geringer Geschwindigkeit ungleichmäßig läuft; verkleinern, wenn bei heruntergesetztem CV 53 Höchstgeschwindigkeit der Lok zu gering ist</tooltip>
      </variable>
      <variable item="Short circuit supervision" CV="60" default="35" readOnly="yes">
        <decVal max="35"/>
        <label>Short circuit supervision</label>
        <label xml:lang="de">Kurzschlussüberwachung</label>
        <tooltip>Do not change! 0=deactivated - 35=activated</tooltip>
      </variable>
      <variable item="Motorola address 2" CV="62" default="0" include="76150">
        <decVal max="80"/>
        <label>Motorola loco address 2</label>
        <label xml:lang="de">Motorola lokadresse 2</label>
        <tooltip>for F5 to F8 (Value 1-80)</tooltip>
        <tooltip xml:lang="de">für F5 bis F8 (Wert 1-80)</tooltip>
      </variable>	  
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv65.66registers.xml"/>
      <!-- No Speed Table for this decoder -->
      <!-- <variable label="Speed Table" CV="67"> -->
      <!--   <speedTableVal/> -->
      <!--   <label>Speed Table</label> -->
      <!-- </variable> -->
      <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/cv100error.xml"/> 
      <variable item="LISSY Train Category" CV="115" default="1" include="76150">
        <decVal max="4"/>
        <label>LISSY Train Category</label>
        <label xml:lang="de">LISSY Zugkategorie</label>
        <tooltip>Value 1 - 4</tooltip>         
      </variable>
    </variables>
    <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/factReset.xml"/>
  </decoder>
  <xi:include href="http://jmri.org/xml/decoders/uhlenbrock/PaneUhlenbrock.xml"/>
</decoder-config>
