<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2023 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" showEmptyPanes="no">

<!-- Comments by Author: Lolke Bijlsma (lbijlsma@pobox.com)                                                      -->
<!-- Based on decoder manual 0.5.05 (v5 & v6). With support of Train-O-Matic.                                    -->
<!-- Covers all the known versions of the Lokommander II decoder with firmware versions 5 & 6 at this time       -->

  <version author="lbijlsma@pobox.com" version="1" lastUpdated="20230913"/>
  <version author="lbijlsma@pobox.com" version="2" lastUpdated="20240422"/>
  <version author="lbijlsma@pobox.com" version="3" lastUpdated="20250116"/> <!-- factReset CV8 -->

  <decoder>
    <family name="Lokommander 2 v6" mfg="Tehnologistic (train-O-matic)">
      <model model="Lokommander 2 Micro" numOuts="6" numFns="15" lowVersionID="5" highVersionID="6" connector="Wires/NEM651" productID="2010220,2010221,2010222,2010223,2010227">
        <output name="1" >
            <label>FL</label>
            <label xml:lang="cs">Světla|vpřed</label>
        </output>
        <output name="2" >
            <label>RL</label>
            <label xml:lang="cs">Světla|vzad</label>
        </output>
        <output name="3"  label="Aux1" />
        <output name="4"  label="Aux2" />
        <output name="5"  label="Aux3" />
        <output name="6"  label="Aux4" />
        <size length="12.9" width="9.2" height="3.3" units="mm"/>
      </model>
      <model model="Lokommander 2 Micro N18" numOuts="8" numFns="15" lowVersionID="5" highVersionID="6" connector="Next18" productID="2010216,2010226">
        <output name="1" >
            <label>FL</label>
            <label xml:lang="cs">Světla|vpřed</label>
        </output>
        <output name="2" >
            <label>RL</label>
            <label xml:lang="cs">Světla|vzad</label>
        </output>
        <output name="3"  label="Aux1" />
        <output name="4"  label="Aux2" />
        <output name="5"  label="Aux3" />
        <output name="6"  label="Aux4" />
        <output name="7"  label="Aux5" />
        <output name="8"  label="Aux6" />
        <size length="14.2" width="9.2" height="3.3" units="mm"/>
      </model>
      <model model="Lokommander 2 Mini" numOuts="6" numFns="15" lowVersionID="5" highVersionID="6" connector="Wires/NEM651/NEM652" productID="2010210,2010211,2010207,2010212">
        <output name="1" >
            <label>FL</label>
            <label xml:lang="cs">Světla|vpřed</label>
        </output>
        <output name="2" >
            <label>RL</label>
            <label xml:lang="cs">Světla|vzad</label>
        </output>
        <output name="3"  label="Aux1" />
        <output name="4"  label="Aux2" />
        <output name="5"  label="Aux3" />
        <output name="6"  label="Aux4" />
        <output name="7"  label="Aux5" />
        <output name="8"  label="Aux6" />
        <size length="19.5" width="11" height="3.3" units="mm"/>
      </model>
      <model model="Lokommander 2 Mini M21" numOuts="8" numFns="15" lowVersionID="5" highVersionID="6" connector="21MTC" productID="2010208,2010209,2010228">
        <output name="1" >
            <label>FL</label>
            <label xml:lang="cs">Světla|vpřed</label>
        </output>
        <output name="2" >
            <label>RL</label>
            <label xml:lang="cs">Světla|vzad</label>
        </output>
        <output name="3"  label="Aux1" />
        <output name="4"  label="Aux2" />
        <output name="5"  label="Aux3" />
        <output name="6"  label="Aux4" />
        <output name="7"  label="Aux5" />
        <output name="8"  label="Aux6" />
        <size length="19.5" width="11" height="3.3" units="mm"/>
      </model>
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes"/>
    <variables>

      <xi:include href="http://jmri.org/xml/decoders/tOm/commonCVs.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/tOm/cv33.47.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/tOm/cv114.116_v6.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/tOm/brakeCVs.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/tOm/functionOutputsCVs.xml"/>


    </variables>

    <resets>
      <factReset CV="8" default="8">
          <label>HARD RESET all CVs reset to default values</label>
          <label xml:lang="cs">HARD RESET všechny CV se resetují na výchozí hodnoty</label>
      </factReset>
      <factReset CV="30" default="0">
          <label>RESET Error information</label>
          <label xml:lang="cs">RESET Informace o chybě</label>
      </factReset>
    </resets>

  </decoder>

  <xi:include href="http://jmri.org/xml/decoders/tOm/lightsPane.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/tOm/functionsPane_v6.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/tOm/inhibitFunctionPane_v6.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/tOm/brakePane.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/tOm/advancedPane_v6.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/tOm/tOmPane.xml"/>

</decoder-config>
