<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2022 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 manuals 0.1.22 (v3) and 0.5.05 (v5). With support of Train-O-Matic.                        -->
<!-- Covers all the known versions of the Lokommander II decoder at this time                                    -->

<!-- This definition covers the V5 & V6 firmware for the models with NMRA function mapping (12 outputs)          -->

  <version author="lbijlsma@pobox.com" version="1" lastUpdated="20230913"/>
  <version author="Petr Šídlo sidlo64@hotmail.com" version="2" lastUpdated="20220814"/> <!-- factReset CV30 -->
  <version author="lbijlsma@pobox.com" version="3" lastUpdated="20230921"/> <!-- v6 firmware specific panes -->
  <version author="lbijlsma@pobox.com" version="4" lastUpdated="20240422"/> <!-- CV114-CV116 changes        -->
  <version author="lbijlsma@pobox.com" version="5" lastUpdated="20250116"/> <!-- factReset CV8 -->

  <decoder>
    <family name="Lokommander 2 v6" mfg="Tehnologistic (train-O-matic)">
       <model model="Lokommander 2 Mini P22" numOuts="12" numFns="15" lowVersionID="5" highVersionID="6" connector="PluX22" productID="2010217">
        <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" />
        <output name="9"  label="Aux7" />
        <output name="10" label="Aux8" />
        <output name="11" label="Aux9" />
        <output name="12" label="Aux10" />
        <size length="20.5" width="15" height="3.2" units="mm"/>
      </model>
      <model model="Lokommander 2 Mini W22" numOuts="12" numFns="15" lowVersionID="5" highVersionID="6" connector="Wires/NEM652" productID="2010218,2010229">
        <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" />
        <output name="9"  label="Aux7" />
        <output name="10" label="Aux8" />
        <output name="11" label="Aux9" />
        <output name="12" label="Aux10" />
        <size length="20.5" width="15" height="3.2" 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_p22.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>
