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

<!-- Copyright (C) JMRI 2003, 2004, 2007 All rights reserved -->
<!-- $Id: Atlas_DualMode.xml,v 1.18 2007/09/21 05:49:30 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="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 -->

<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"></programming>

	<variables>
		<variable label="Primary Address" CV="1" comment="Short address"
						item="Short Address"  default="03">
			<shortAddressVal/></variable>
		<variable label="Start Volts" CV="2" item="Vstart"
						comment="A value of 255 corresponds to 100%">
			<decVal/></variable>
		<variable label="Acceleration momentum" CV="3"
						item="Accel" >
			<decVal max="31"/></variable>
		<variable label="Brake momentum" CV="4"
						item="Decel">
			<decVal max="31"/></variable>
		<variable label="Manufacturer Version No" CV="7" readOnly="yes"
						item="Decoder Version"><decVal/></variable>
		<variable label="Manufacturer ID" CV="8" readOnly="yes"
						item="Manufacturer">			<decVal/></variable>

		<variable label="Extended Address" CV="17"
						item="Long Address" >
			<longAddressVal/></variable>
			
		<variable label="Consist Address" CV="19" mask="XVVVVVVV" item="Consist Address">
			<decVal/></variable>
		
		<variable label="Consist Direction" CV="19" mask="VXXXXXXX">
			<enumVal>
				<enumChoice choice="Normal"></enumChoice>
				<enumChoice choice="Reversed"></enumChoice>
				</enumVal></variable>
		

		<variable label="Consist Acceleration Adjustment" CV="23" mask="XVVVVVVV">
				<decVal max="127"/>
			</variable>
		<variable label="Consist Acceleration Adjustment Sign" CV="23" mask="VXXXXXXX">
			<enumVal>
				<enumChoice choice="Adjustment Added"/>
				<enumChoice choice="Adjustment Subtracted"/>
				</enumVal></variable>
		<variable label="Consist Deceleration Adjustment" CV="24" mask="XVVVVVVV">
				<decVal max="127"/>
			</variable>
		<variable label="Consist Deceleration Adjustment Sign" CV="24" mask="VXXXXXXX">
			<enumVal>
				<enumChoice choice="Adjustment Added"/>
				<enumChoice choice="Adjustment Subtracted"/>
				</enumVal></variable>

		<variable label="Locomotive Direction" CV="29" mask="XXXXXXXV">
			<enumVal>
				<enumChoice choice="normal"/>
				<enumChoice choice="reversed"/>
				</enumVal></variable>
		<variable label="FL Location" CV="29" mask="XXXXXXVX"
					item="Speed Step Mode">
			<enumVal>
				<enumChoice choice="14 speed step format"/>
				<enumChoice choice="28 speed step format"/>
				</enumVal></variable>
		<variable label="Power Source Conversion" CV="29" mask="XXXXXVXX"
					item="Analog (DC) Operation" >
			<enumVal>
				<enumChoice choice="NMRA Digital only"/>
				<enumChoice choice="DC conversion enabled"/>
				</enumVal></variable>
		<variable label="Speed Table Definition" CV="29" mask="XXXVXXXX">
			<enumVal>
				<enumChoice choice="Don't use Speed Table"/>
				<enumChoice choice="Use Speed Table"/>
				</enumVal></variable>
		<variable label="Address Format" CV="29" mask="XXVXXXXX">
			<enumVal>
				<enumChoice choice="One byte (short) address"/>
				<enumChoice choice="Two byte (extended) address"/>
				</enumVal></variable>
			
		<variable label="Speed Table" CV="67">
			<speedTableVal/></variable>

		<variable label="User Id #1" CV="105">			<decVal/></variable>
		<variable label="User Id #2" CV="106">			<decVal/></variable>
		
		<!-- Atlas-specific variables -->

		<variable label="Consist Accel and Decel Trims" CV="50" mask="XXXXXXVX"
					item="Consist Adjustments Active">
			<enumVal>
				<enumChoice choice="Not Active"/>
				<enumChoice choice="Active"/>
				</enumVal>
			</variable>
		<variable label="Brake Momentum on DC operation" CV="50" mask="XXXXXVXX"
				item="DC Brake Momentum">
			<enumVal>
				<enumChoice choice="Off"/>
				<enumChoice choice="On"/>
				</enumVal>
			</variable>

		<variable label="Directional Headlights" CV="51" mask="XXXXXXXV">
			<enumVal>
				<enumChoice choice="Headlights are Directional"/>
				<enumChoice choice="Headlights Independent, F0 front, F1 rear"/>
				</enumVal>
			</variable>
		<variable label="Functional Headlight Dimming" CV="51" mask="XXXXXXVX"
				item="Global lighting option 1">
			<enumVal>
				<enumChoice choice="Dimming Disabled"/>
				<enumChoice choice="Dimming Enabled. If headlights independent, F1 dims headlight"/>
				</enumVal>
			</variable>
		<variable label="If Lights Independent, F4 dims F0" CV="51" mask="XXXXXVXX"
				item="Global lighting option 2">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
				</enumVal>
			</variable>
		<variable label="If Lights Independent, F4 dims F1" CV="51" mask="XXXXVXXX"
				item="Global lighting option 3">
			<enumVal>
				<enumChoice choice="No"/>
				<enumChoice choice="Yes"/>
				</enumVal>
			</variable>
		<variable label="Dimming Value" CV="52"
				item="Global lighting option 4" default="64">
			<decVal/>
			</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>
</decoder>

<pane name="Atlas">
	<column>
		<display item="Brake Momentum on DC operation" />
		<display item="Consist Accel and Decel Trims" />
		<display item="Decoder Software Version" />
	</column>
</pane>

</decoder-config>


