<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!DOCTYPE decoder-config SYSTEM "../DTD/decoder-config.dtd">

<!-- Copyright (C) JMRI 2007 All rights reserved -->
<!-- $Id: MRC_Athearn_F_Unit.xml,v 1.1 2009/07/03 06:44:50 jacobsen Exp $ -->
<!--                                                                        -->
<!-- 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>
        <version author="Bob Jacobsen" version="1" lastUpdated="20071221" />
        <version author="Marc Fournier forfoum@videotron.ca" version="2" lastUpdated="20090624" />

        <!-- Ver 1  Made from the MRC_1645 file -->
        <!-- Ver 2  Changed family to group Athearn together, cleanup, moved the -->
        <!--        consist light function into the consist TAB -->

<decoder>
    <family name="Athearn" mfg="MRC"
            lowVersionID="32" highVersionID="32">
        <model model="Athearn Genesis F Unit" numOuts="2" numFns="19"
                    maxTotalCurrent="1.5A" extFnsNmraF13="yes">
                </model>
    </family>

    <programming direct="yes" paged="yes" register="yes" ops="yes"/>

    <variables>

        <variable label="Short address" CV="1" comment="Range 1-127"
                        item="Short Address" default="3">
            <shortAddressVal/>
        </variable>

        <variable label="Start voltage" CV="2" item="Vstart" default="0"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Acceleration" CV="3" item="Accel" default="0"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Deceleration" CV="4" item="Decel" default="0"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Top voltage" CV="5" item="Vhigh" default="32"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Middle Voltage" CV="6" item="Vmid" default="1"
                comment="Range 0-1">
            <decVal max="1"/>
        </variable>

        <variable label="Manufacturer version number" CV="7" readOnly="yes"
                item="Decoder Version" default="32">
            <decVal/>
        </variable>

        <variable label="Manufacturer ID" CV="8" readOnly="yes"
                item="Manufacturer" default="143">
            <decVal/>
        </variable>

        <variable label="Long address" CV="17" item="Long Address"
                comment="4 digit address (Range 0001-9999)">
            <longAddressVal/>
        </variable>

        <variable label="Advanced consist address" CV="19" mask="XVVVVVVV" item="Consist Address">
            <decVal/>
        </variable>

        <variable label="Consist Light Functions follows " CV="21" mask="XXXXXXXV" default="0"
        item="Consist Function" tooltip="Advanced consist accessory function assignment works only when CV19 = non zero">
            <enumVal>
                <enumChoice choice="Locomotive Base Address"/>
                <enumChoice choice="Locomotive Consist Address"/>
            </enumVal>
        </variable>

        <variable label="Normal direction of motion" CV="29"
                mask="XXXXXXXV"
                item="Locomotive Direction">
            <enumVal>
                <enumChoice choice="Forward"/>
                <enumChoice choice="Reverse"/>
            </enumVal>
        </variable>

        <variable label="Speed Steps" CV="29" mask="XXXXXXVX"
                item="Speed Step Mode" default="1">
            <enumVal>
                <enumChoice choice="14"/>
                <enumChoice choice="28/128 (recommended)"/>
                </enumVal>
        </variable>

        <variable label="Analog conversion mode" CV="29"
                mask="XXXXXVXX" default="0"
                item="Analog (DC) Operation">
            <enumVal>
                <enumChoice choice="Off"/>
                <enumChoice choice="On"/>
                </enumVal>
        </variable>

        <variable label="Addressing Mode" CV="29" mask="XXVXXXXX"
                item="Address Format">
            <enumVal>
                <enumChoice choice="2 digit addressing"/>
                <enumChoice choice="4 digit addressing"/>
            </enumVal>
        </variable>

        <variable label="Horn type" CV="50" item="Sound Option 2" default="4"
                comment="Range 0-11 (11 is off)">
            <decVal max="16"/>
        </variable>

        <variable label="Horn volume" CV="51" item="Sound Setting 1" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Bell type" CV="52" item="Sound Option 3" default="3"
                comment="Range 0-7 (7 is off)">
            <decVal max="7"/>
        </variable>

        <variable label="Bell volume" CV="53" item="Sound Setting 2" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Bell ring rate" CV="54" item="Sound Setting 3" default="3"
                comment="Range 0-50">
            <decVal max="50"/>
        </variable>

        <variable label="Diesel volume" CV="55" item="Sound Setting 4" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Brake squeal volume" CV="56" item="Sound Setting 5" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Dynamic brake volume" item="Sound Setting 6" CV="57" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Air release volume" item="Sound Setting 7" CV="58" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Air pump volume" CV="59" item="Sound Setting 8" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Safety pop valve volume" CV="60" item="Sound Setting 11" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Engine cooling fan volume" CV="61" item="Sound Setting 12" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Coupling volume" CV="62" item="Sound Setting 13" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Random noise volume" CV="63" item="Sound Setting 14" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Rail wheel clack" CV="64" item="Sound Setting 15" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="User ID #1" CV="105" item="User Id #1" default="0"
                comment="Range 0-255">
            <decVal max="255"/>
        </variable>

        <variable label="User ID #2" CV="106" item="User Id #2" default="0"
                comment="Range 0-255">
            <decVal max="255"/>
        </variable>

        <variable label="Exhaust volume" CV="112" item="Sound Setting 16" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Coupling fire volume" CV="113" item="Sound Setting 17" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Brake release volume" CV="114" item="Sound Setting 18" default="3"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Auto Brake squeal" item="Sound Option 5" CV="115" default="1">
             <enumVal>
                 <enumChoice choice="Off"/>
                 <enumChoice choice="On"/>
             </enumVal>
        </variable>

        <variable label="Coupling Sound Type" item="Sound Option 6" CV="116" default="1">
             <enumVal>
                 <enumChoice choice="Type 0"/>
                 <enumChoice choice="Type 1"/>
                 <enumChoice choice="Off (2)"/>
             </enumVal>
        </variable>

        <variable label="Lights Enable/Disable" item="Lights Enable" CV="117" default="1">
             <enumVal>
                 <enumChoice choice="Off"/>
                 <enumChoice choice="On"/>
             </enumVal>
        </variable>

</variables>

<resets>
        <factReset label="Reset All CVs" CV="125" default="1"/>
</resets>

</decoder>

    <pane name="MRC">

        <column>
            <label label="MRC Note "/>
            <label label=" "/>
            <label label="This decoder supports all program methods including register mode, paged mode, "/>
            <label label="CV programming, direct mode and programming on the main (OPS mode programming)."/>
            <label label="Program the locomotive the same way you would program any other NMRA compatible "/>
            <label label="decoder with your DCC system. "/>
            <label label=" "/>
            <separator/>
            <label label="Note: Due to the nature of dual function decoders, it does not support the CV read "/>
            <label label="back feature. The Dual-Function decoder is manufactured by Model Rectifier Corporation "/>
            <label label="for Athearn Trains. "/>
            <label label=" "/><separator/><label label=" "/>
            <label label=" LIGHT FUNCTION "/>
            <display item="Lights Enable" tooltip ="Turn lights on/off"/>

        </column>
    </pane>

</decoder-config>




 	  	 
