<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2001, 2005, 2007, 2-009, 2010 All rights reserved -->
<!-- $Id: Atlas_DualMode.xml 17977 2011-07-18 17:23:46Z zoo $ -->
<!--                                                                        -->
<!-- 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="Peter Ulvestad" version="6" lastUpdated="20091027"/>
  <version author="Michael Mosher" version="5" lastUpdated="20030706"/>
<!-- V3 add versionID range -->
<!-- V4 - add consist direction - jake -->
<!-- V5 - renamed and few tweeks to co-exist with four function decoder, fixed vstart bug -->
<!-- V6 - Added factory reset, added CV2 max value -->
  <decoder>
    <family name="Dual Mode" mfg="Atlas" lowVersionID="45" highVersionID="45">
      <model model="Dual Mode" numOuts="2" numFns="0"/>
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes"/>
    <variables>
      <variable label="Primary Address" CV="1" comment="Short address" item="Short Address" default="03">
        <shortAddressVal/>
        <label>Primary Address</label>
        <comment>Short address</comment>
      </variable>
      <variable label="Start Volts" CV="2" comment="0-31" item="Vstart" default="8">
        <decVal max="31"/>
        <label>Start Volts</label>
        <comment>0-31</comment>
      </variable>
      <variable label="Acceleration momentum" CV="3" item="Accel">
        <decVal max="31"/>
        <label>Acceleration momentum</label>
      </variable>
      <variable label="Brake momentum" CV="4" item="Decel">
        <decVal max="31"/>
        <label>Brake momentum</label>
      </variable>
      <variable label="Manufacturer Version No" CV="7" readOnly="yes" item="Decoder Version">
        <decVal/>
        <label>Manufacturer Version No</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" readOnly="yes" item="Manufacturer">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="Extended Address" CV="17" item="Long Address">
        <longAddressVal/>
        <label>Extended Address</label>
      </variable>
      <variable label="Consist Address" CV="19" mask="XVVVVVVV" item="Consist Address">
        <decVal/>
        <label>Consist Address</label>
      </variable>
      <variable label="Consist Direction" CV="19" mask="VXXXXXXX">
        <enumVal>
          <enumChoice choice="Normal">
            <choice>Normal</choice>
          </enumChoice>
          <enumChoice choice="Reversed">
            <choice>Reversed</choice>
          </enumChoice>
        </enumVal>
        <label>Consist Direction</label>
      </variable>
      <variable label="Consist Acceleration Adjustment" CV="23" mask="XVVVVVVV">
        <decVal max="127"/>
        <label>Consist Acceleration Adjustment</label>
      </variable>
      <variable label="Consist Acceleration Adjustment Sign" CV="23" mask="VXXXXXXX">
        <enumVal>
          <enumChoice choice="Adjustment Added">
            <choice>Adjustment Added</choice>
          </enumChoice>
          <enumChoice choice="Adjustment Subtracted">
            <choice>Adjustment Subtracted</choice>
          </enumChoice>
        </enumVal>
        <label>Consist Acceleration Adjustment Sign</label>
      </variable>
      <variable label="Consist Deceleration Adjustment" CV="24" mask="XVVVVVVV">
        <decVal max="127"/>
        <label>Consist Deceleration Adjustment</label>
      </variable>
      <variable label="Consist Deceleration Adjustment Sign" CV="24" mask="VXXXXXXX">
        <enumVal>
          <enumChoice choice="Adjustment Added">
            <choice>Adjustment Added</choice>
          </enumChoice>
          <enumChoice choice="Adjustment Subtracted">
            <choice>Adjustment Subtracted</choice>
          </enumChoice>
        </enumVal>
        <label>Consist Deceleration Adjustment Sign</label>
      </variable>
      <variable label="Locomotive Direction" CV="29" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="normal">
            <choice>normal</choice>
          </enumChoice>
          <enumChoice choice="reversed">
            <choice>reversed</choice>
          </enumChoice>
        </enumVal>
        <label>Locomotive Direction</label>
      </variable>
      <variable label="FL Location" CV="29" mask="XXXXXXVX" item="Speed Step Mode">
        <enumVal>
          <enumChoice choice="14 speed step format">
            <choice>14 speed step format</choice>
          </enumChoice>
          <enumChoice choice="28 speed step format">
            <choice>28 speed step format</choice>
          </enumChoice>
        </enumVal>
        <label>FL Location</label>
      </variable>
      <variable label="Power Source Conversion" CV="29" mask="XXXXXVXX" item="Analog (DC) Operation">
        <enumVal>
          <enumChoice choice="NMRA Digital only">
            <choice>NMRA Digital only</choice>
          </enumChoice>
          <enumChoice choice="DC conversion enabled">
            <choice>DC conversion enabled</choice>
          </enumChoice>
        </enumVal>
        <label>Power Source Conversion</label>
      </variable>
      <variable label="Speed Table Definition" CV="29" mask="XXXVXXXX">
        <enumVal>
          <enumChoice choice="Don't use Speed Table">
            <choice>Don't use Speed Table</choice>
          </enumChoice>
          <enumChoice choice="Use Speed Table">
            <choice>Use Speed Table</choice>
          </enumChoice>
        </enumVal>
        <label>Speed Table Definition</label>
      </variable>
      <variable label="Address Format" CV="29" mask="XXVXXXXX">
        <enumVal>
          <enumChoice choice="One byte (short) address">
            <choice>One byte (short) address</choice>
          </enumChoice>
          <enumChoice choice="Two byte (extended) address">
            <choice>Two byte (extended) address</choice>
          </enumChoice>
        </enumVal>
        <label>Address Format</label>
      </variable>
      <variable label="Speed Table" CV="67">
        <speedTableVal/>
        <label>Speed Table</label>
      </variable>
      <variable label="User Id #1" CV="105">
        <decVal/>
        <label>User Id #1</label>
      </variable>
      <variable label="User Id #2" CV="106">
        <decVal/>
        <label>User Id #2</label>
      </variable>
<!-- Atlas-specific variables -->
      <variable label="Consist Accel and Decel Trims" CV="50" mask="XXXXXXVX" item="Consist Adjustments Active">
        <enumVal>
          <enumChoice choice="Not Active">
            <choice>Not Active</choice>
          </enumChoice>
          <enumChoice choice="Active">
            <choice>Active</choice>
          </enumChoice>
        </enumVal>
        <label>Consist Accel and Decel Trims</label>
      </variable>
      <variable label="Brake Momentum on DC operation" CV="50" mask="XXXXXVXX" item="DC Brake Momentum">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="On">
            <choice>On</choice>
          </enumChoice>
        </enumVal>
        <label>Brake Momentum on DC operation</label>
      </variable>
      <variable label="Directional Headlights" CV="51" mask="XXXXXXXV">
        <enumVal>
          <enumChoice choice="Headlights are Directional">
            <choice>Headlights are Directional</choice>
          </enumChoice>
          <enumChoice choice="Headlights Independent, F0 front, F1 rear">
            <choice>Headlights Independent, F0 front, F1 rear</choice>
          </enumChoice>
        </enumVal>
        <label>Directional Headlights</label>
      </variable>
      <variable label="Functional Headlight Dimming" CV="51" mask="XXXXXXVX" item="Global lighting option 1">
        <enumVal>
          <enumChoice choice="Dimming Disabled">
            <choice>Dimming Disabled</choice>
          </enumChoice>
          <enumChoice choice="Dimming Enabled. If headlights independent, F1 dims headlight">
            <choice>Dimming Enabled. If headlights independent, F1 dims headlight</choice>
          </enumChoice>
        </enumVal>
        <label>Functional Headlight Dimming</label>
      </variable>
      <variable label="If Lights Independent, F4 dims F0" CV="51" mask="XXXXXVXX" item="Global lighting option 2">
        <enumVal>
          <enumChoice choice="No">
            <choice>No</choice>
          </enumChoice>
          <enumChoice choice="Yes">
            <choice>Yes</choice>
          </enumChoice>
        </enumVal>
        <label>If Lights Independent, F4 dims F0</label>
      </variable>
      <variable label="If Lights Independent, F4 dims F1" CV="51" mask="XXXXVXXX" item="Global lighting option 3">
        <enumVal>
          <enumChoice choice="No">
            <choice>No</choice>
          </enumChoice>
          <enumChoice choice="Yes">
            <choice>Yes</choice>
          </enumChoice>
        </enumVal>
        <label>If Lights Independent, F4 dims F1</label>
      </variable>
      <variable label="Dimming Value" CV="52" item="Global lighting option 4" default="64">
        <decVal/>
        <label>Dimming Value</label>
      </variable>
      <variable label="Decoder Software Version" CV="128" readOnly="yes">
        <decVal/>
        <label>Decoder Software Version</label>
      </variable>
<!-- Define the fixed Function-Output mapping -->
      <constant label="FL(f) controls output 1" minOut="1" default="1"/>
      <constant label="FL(r) controls output 2" minOut="2" default="1"/>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="33"/>
    </resets>
  </decoder>
  <pane name="Atlas">
    <column>
      <display item="Decoder Software Version"/>
    </column>
    <name>Atlas</name>
  </pane>
</decoder-config>

