<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2003 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="Alain Le Marchand" version="3" lastUpdated="20180216"/>
  <version author="sip@euronet.nl" version="2" lastUpdated="20030606"/>
  <!-- version 2 - add consist direction - jake -->
  <!-- Version 3 - Implement Reset properly (Alain Le Marchand) -->
  <decoder>
    <family name="Function Decoder" mfg="Lenz" lowVersionID="10">
      <model model="LF100XF" numOuts="4" numFns="12" nmraWarrant="yes" nmraWarrantStart="200506">
        <output name="1" label="A - White"/>
        <output name="2" label="B - Yellow"/>
        <output name="3" label="C - Green"/>
        <output name="4" label="D - Violet"/>
      </model>
    </family>
    <programming direct="byteOnly" paged="yes" register="yes" ops="yes"/>
    <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="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=19 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/consistAddrDirection.xml"/>
      <!-- CV=29 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29direction.xml"/>
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv29speedSteps.xml"/>
      <variable item="F4 controls output 1" CV="38" mask="XXVXXXXX" minOut="1" minFn="4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F4 controls output 1</label>
        <label xml:lang="de">F4 controls output 1</label>
      </variable>
      <variable item="F4 controls output 2" CV="38" mask="XVXXXXXX" minOut="2" minFn="4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F4 controls output 2</label>
        <label xml:lang="de">F4 controls output 2</label>
      </variable>
      <variable item="F5 controls output 1" CV="39" mask="XXVXXXXX" minOut="1" minFn="5">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F5 controls output 1</label>
        <label xml:lang="de">F5 controls output 1</label>
      </variable>
      <variable item="F5 controls output 2" CV="39" mask="XVXXXXXX" minOut="2" minFn="5">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F5 controls output 2</label>
        <label xml:lang="de">F5 controls output 2</label>
      </variable>
      <variable item="F6 controls output 1" CV="40" mask="XXVXXXXX" minOut="1" minFn="6">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F6 controls output 1</label>
        <label xml:lang="de">F6 controls output 1</label>
      </variable>
      <variable item="F6 controls output 2" CV="40" mask="XVXXXXXX" minOut="2" minFn="6">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F6 controls output 2</label>
        <label xml:lang="de">F6 controls output 2</label>
      </variable>
      <variable item="F7 controls output 1" CV="41" mask="XXVXXXXX" minOut="1" minFn="7">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F7 controls output 1</label>
        <label xml:lang="de">F7 controls output 1</label>
      </variable>
      <variable item="F7 controls output 2" CV="41" mask="XVXXXXXX" minOut="2" minFn="7">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F7 controls output 2</label>
        <label xml:lang="de">F7 controls output 2</label>
      </variable>
      <variable item="F8 controls output 1" CV="42" mask="XXVXXXXX" minOut="1" minFn="8">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F8 controls output 1</label>
        <label xml:lang="de">F8 controls output 1</label>
      </variable>
      <variable item="F8 controls output 2" CV="42" mask="XVXXXXXX" minOut="2" minFn="8">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F8 controls output 2</label>
        <label xml:lang="de">F8 controls output 2</label>
      </variable>
      <variable item="F9 controls output 1" CV="43" mask="XXXXXVXX" minOut="1" minFn="9">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F9 controls output 1</label>
        <label xml:lang="de">F9 controls output 1</label>
      </variable>
      <variable item="F9 controls output 2" CV="43" mask="XXXXVXXX" minOut="2" minFn="9">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F9 controls output 2</label>
        <label xml:lang="de">F9 controls output 2</label>
      </variable>
      <variable item="F10 controls output 1" CV="44" mask="XXXXXVXX" minOut="1" minFn="10">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F10 controls output 1</label>
        <label xml:lang="de">F10 controls output 1</label>
      </variable>
      <variable item="F10 controls output 2" CV="44" mask="XXXXVXXX" minOut="2" minFn="10">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F10 controls output 2</label>
        <label xml:lang="de">F10 controls output 2</label>
      </variable>
      <variable item="F11 controls output 1" CV="45" mask="XXXXXVXX" minOut="1" minFn="11">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F11 controls output 1</label>
        <label xml:lang="de">F11 controls output 1</label>
      </variable>
      <variable item="F11 controls output 2" CV="45" mask="XXXXVXXX" minOut="2" minFn="11">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F11 controls output 2</label>
        <label xml:lang="de">F11 controls output 2</label>
      </variable>
      <variable item="F12 controls output 1" CV="46" mask="XXXXXVXX" minOut="1" minFn="12">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F12 controls output 1</label>
        <label xml:lang="de">F12 controls output 1</label>
      </variable>
      <variable item="F12 controls output 2" CV="46" mask="XXXXVXXX" minOut="2" minFn="12">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F12 controls output 2</label>
        <label xml:lang="de">F12 controls output 2</label>
      </variable>
     <!-- CV=51 -->
     <xi:include href="http://jmri.org/xml/decoders/nmra/cv51_DirectionalHeadlights.xml"/>
      <variable item="Output A dimming control" CV="51" comment="Controls how headlight dims (CV 52 controls amount)" mask="XXXXXXVX">
        <enumVal>
          <enumChoice choice="Always dim">
            <choice>Always dim</choice>
            <choice xml:lang="de">Always dim</choice>
          </enumChoice>
          <enumChoice choice="F1 or F4 controls dimming">
            <choice>F1 or F4 controls dimming</choice>
            <choice xml:lang="de">F1 or F4 controls dimming</choice>
          </enumChoice>
        </enumVal>
        <label>Output A dimming control</label>
        <comment>Controls how headlight dims (CV 52 controls amount)</comment>
        <label xml:lang="de">Output A dimming control</label>
        <comment xml:lang="de">Controls how headlight dims (CV 52 controls amount)</comment>
      </variable>
      <variable item="Front headlight (Output A) dimming" CV="51" comment="Controls how front headlights dim" mask="XXXXXVXX">
        <enumVal>
          <enumChoice choice="Front headlight never dim">
            <choice>Front headlight never dim</choice>
            <choice xml:lang="de">Front headlight never dim</choice>
          </enumChoice>
          <enumChoice choice="Front headlight can dim">
            <choice>Front headlight can dim</choice>
            <choice xml:lang="de">Front headlight can dim</choice>
          </enumChoice>
        </enumVal>
        <label>Front headlight (Output A) dimming</label>
        <comment>Controls how front headlights dim</comment>
        <label xml:lang="de">Front headlight (Output A) dimming</label>
        <comment xml:lang="de">Controls how front headlights dim</comment>
      </variable>
      <variable item="Output A is Gyrolight" CV="51" mask="XXXVXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output A is Gyrolight</label>
        <label xml:lang="de">Output A is Gyrolight</label>
      </variable>
      <variable item="Output A is Mars light" CV="51" mask="XXVXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output A is Mars light</label>
        <label xml:lang="de">Output A is Mars light</label>
      </variable>
      <variable item="Output A is single strobe" CV="51" mask="XVXXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output A is single strobe</label>
        <label xml:lang="de">Output A is single strobe</label>
      </variable>
      <variable item="Output A is double strobe" CV="51" mask="VXXXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output A is double strobe</label>
        <label xml:lang="de">Output A is double strobe</label>
      </variable>
      <variable item="Output A dim intensity" CV="52" default="64" comment="Controls how much headlights dim (0-dark to 255-max bright)">
        <decVal min="0" max="255"/>
        <label>Output A dim intensity</label>
        <comment>Controls how much headlights dim (0-dark to 255-max bright)</comment>
        <label xml:lang="de">Output A dim intensity</label>
        <comment xml:lang="de">Controls how much headlights dim (0-dark to 255-max bright)</comment>
      </variable>
      <variable item="Output C blinks" CV="53" minOut="3" mask="XXXXXXXV">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output C blinks</label>
        <label xml:lang="de">Output C blinks</label>
      </variable>
      <variable item="Output D blinks" CV="53" minOut="4" mask="XXXXXXVX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output D blinks</label>
        <label xml:lang="de">Output D blinks</label>
      </variable>
      <variable item="Output C, D are ditch lights" CV="53" minOut="3" mask="XXXXXVXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output C, D are ditch lights</label>
        <label xml:lang="de">Output C, D are ditch lights</label>
      </variable>
      <variable CV="54" mask="XXXXXXXV" minOut="3" minFn="1" item="F1 controls output 3" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output C</label>
        <label xml:lang="de">F1 controls output 3</label>
      </variable>
      <variable CV="54" mask="XXXXXXVX" minOut="3" minFn="2" item="F2 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output C</label>
        <label xml:lang="de">F2 controls output 3</label>
      </variable>
      <variable CV="54" mask="XXXXXVXX" minOut="3" minFn="3" item="F3 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output C</label>
        <label xml:lang="de">F3 controls output 3</label>
      </variable>
      <variable CV="54" mask="XXXXVXXX" minOut="3" minFn="4" item="F4 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F4 controls output C</label>
        <label xml:lang="de">F4 controls output 3</label>
      </variable>
      <variable CV="54" mask="XXXVXXXX" minOut="3" minFn="5" item="F5 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F5 controls output C</label>
        <label xml:lang="de">F5 controls output 3</label>
      </variable>
      <variable CV="54" mask="XXVXXXXX" minOut="3" minFn="6" item="F6 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F6 controls output C</label>
        <label xml:lang="de">F6 controls output 3</label>
      </variable>
      <variable CV="54" mask="XVXXXXXX" minOut="3" minFn="7" item="F7 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F7 controls output C</label>
        <label xml:lang="de">F7 controls output 3</label>
      </variable>
      <variable CV="54" mask="VXXXXXXX" minOut="3" minFn="8" item="F8 controls output 3">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F8 controls output C</label>
        <label xml:lang="de">F8 controls output 3</label>
      </variable>
      <variable CV="55" mask="XXXXXXXV" minOut="4" minFn="1" item="F1 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F1 controls output D</label>
        <label xml:lang="de">F1 controls output 4</label>
      </variable>
      <variable CV="55" mask="XXXXXXVX" minOut="4" minFn="2" item="F2 controls output 4" default="1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F2 controls output D</label>
        <label xml:lang="de">F2 controls output 4</label>
      </variable>
      <variable CV="55" mask="XXXXXVXX" minOut="4" minFn="3" item="F3 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F3 controls output D</label>
        <label xml:lang="de">F3 controls output 4</label>
      </variable>
      <variable CV="55" mask="XXXXVXXX" minOut="4" minFn="4" item="F4 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F4 controls output D</label>
        <label xml:lang="de">F4 controls output 4</label>
      </variable>
      <variable CV="55" mask="XXXVXXXX" minOut="4" minFn="5" item="F5 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F5 controls output D</label>
        <label xml:lang="de">F5 controls output 4</label>
      </variable>
      <variable CV="55" mask="XXVXXXXX" minOut="4" minFn="6" item="F6 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F6 controls output D</label>
        <label xml:lang="de">F6 controls output 4</label>
      </variable>
      <variable CV="55" mask="XVXXXXXX" minOut="4" minFn="7" item="F7 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F7 controls output D</label>
        <label xml:lang="de">F7 controls output 4</label>
      </variable>
      <variable CV="55" mask="VXXXXXXX" minOut="4" minFn="8" item="F8 controls output 4">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>F8 controls output D</label>
        <label xml:lang="de">F8 controls output 4</label>
      </variable>
      <variable item="Output C, D blink rate" CV="56" default="15" minOut="3">
        <decVal min="0" max="255"/>
        <label>Output C, D blink rate</label>
        <label xml:lang="de">Output C, D blink rate</label>
      </variable>
      <variable item="Output B dimming control" CV="57" mask="XXXXXXVX">
        <enumVal>
          <enumChoice choice="Always dim">
            <choice>Always dim</choice>
            <choice xml:lang="de">Always dim</choice>
          </enumChoice>
          <enumChoice choice="F1 or F4 controls dimming">
            <choice>F1 or F4 controls dimming</choice>
            <choice xml:lang="de">F1 or F4 controls dimming</choice>
          </enumChoice>
        </enumVal>
        <label>Output B dimming control</label>
        <label xml:lang="de">Output B dimming control</label>
      </variable>
      <variable item="Back headlight (Output B) dimming" CV="57" comment="Controls how back headlights dims" mask="XXXXXVXX">
        <enumVal>
          <enumChoice choice="Back headlight never dim">
            <choice>Back headlight never dim</choice>
            <choice xml:lang="de">Back headlight never dim</choice>
          </enumChoice>
          <enumChoice choice="Back headlight can dim">
            <choice>Back headlight can dim</choice>
            <choice xml:lang="de">Back headlight can dim</choice>
          </enumChoice>
        </enumVal>
        <label>Back headlight (Output B) dimming</label>
        <comment>Controls how back headlights dims</comment>
        <label xml:lang="de">Back headlight (Output B) dimming</label>
        <comment xml:lang="de">Controls how back headlights dims</comment>
      </variable>
      <variable item="Output B is Gyrolight" CV="57" mask="XXXVXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output B is Gyrolight</label>
        <label xml:lang="de">Output B is Gyrolight</label>
      </variable>
      <variable item="Output B is Mars light" CV="57" mask="XXVXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output B is Mars light</label>
        <label xml:lang="de">Output B is Mars light</label>
      </variable>
      <variable item="Output B is single strobe" CV="57" mask="XVXXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output B is single strobe</label>
        <label xml:lang="de">Output B is single strobe</label>
      </variable>
      <variable item="Output B is double strobe" CV="57" mask="VXXXXXXX">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Output B is double strobe</label>
        <label xml:lang="de">Output B is double strobe</label>
      </variable>
      <variable item="Output B dim intensity" CV="58" default="64" comment="Controls how much headlights dim (0-dark to 255-max bright)">
        <decVal min="0" max="255"/>
        <label>Output B dim intensity</label>
        <comment>Controls how much headlights dim (0-dark to 255-max bright)</comment>
        <label xml:lang="de">Output B dim intensity</label>
        <comment xml:lang="de">Controls how much headlights dim (0-dark to 255-max bright)</comment>
      </variable>
      <variable CV="105" item="User Id #1">
        <decVal/>
        <label>User Private ID #1</label>
        <label xml:lang="de">User Id #1</label>
      </variable>
      <variable CV="106" item="User Id #2">
        <decVal/>
        <label>User Private ID #2</label>
        <label xml:lang="de">User Id #2</label>
      </variable>
      <!-- Define the fixed Function-Output mapping -->
      <constant item="FL(f) controls output 1" minOut="1" default="1"/>
      <constant item="FL(r) controls output 2" minOut="2" default="1"/>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="33">
        <label xml:lang="it">Reset delle CV ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <name>Lenz</name>
    <name xml:lang="de">Lenz</name>
    <column>
      <display item="Back EMF control"/>
      <label>
        <text/>
      </label>
      <label>
        <text/>
      </label>
      <display item="Front headlight (Output A) dimming"/>
      <display item="Output A dimming control"/>
      <display item="Output A is Gyrolight" format="checkbox"/>
      <display item="Output A is Mars light" format="checkbox"/>
      <display item="Output A is single strobe" format="checkbox"/>
      <display item="Output A is double strobe" format="checkbox"/>
      <display item="Output A dim intensity"/>
      <label>
        <text> </text>
      </label>
      <display item="Back headlight (Output B) dimming"/>
      <display item="Output B dimming control"/>
      <display item="Output B is Gyrolight" format="checkbox"/>
      <display item="Output B is Mars light" format="checkbox"/>
      <display item="Output B is single strobe" format="checkbox"/>
      <display item="Output B is double strobe" format="checkbox"/>
      <display item="Output B dim intensity"/>
      <label>
        <text> </text>
      </label>
      <display item="Output C, D blink rate"/>
      <display item="Output C blinks"/>
      <display item="Output D blinks"/>
      <display item="Output C, D are ditch lights"/>
    </column>
  </pane>
</decoder-config>
