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

<!-- Copyright (C) JMRI 2004 All rights reserved -->
<!-- $Id: HornbyDigital.xml,v 1.1 2008/05/17 16:45:31 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
	showEmptyPanes="no">
<version
	author="John McAleely john@mcaleely.com" 
	version="3" 
	lastUpdated="20080502"
	comment="Added different models for R8215 and decoder fitted models. 
    Renamed family to match branding.
    Taken strict/literal view of what decoder can do." />

<version author="Bob Jacobsen rgj1927@pacbell.net" version="2" lastUpdated="20080415" />
<version author="PGM" version="1" lastUpdated="20071116" />
		<!-- Decoder used in Hornby engines -->

<decoder>
	<family name="Digital" mfg="Hornby">
		
		<!-- We have to choose these by hand - there is no signature to read from the decoder -->
		<productIDalgorithm><none/></productIDalgorithm>
			
		<model 
			model="DCC-Fitted (Motored)"
			numOuts="2" 
			numFns="1" 
		    nmraWarrant="no"
		    maxTotalCurrent="0.5A" 
			formFactor="DCC Fitted"
		    comment="Pendolino, other light only locos"/>
		<model 
			model="R8215"
			numOuts="4"
			numFns="4" 
		    nmraWarrant="no"
		    maxTotalCurrent="0.5A"
			connector="NMRAmedium">
		    <size length="17" width="10" height="3.5" units="mm"/>
        </model>
	</family>

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

	<variables>
		<variable 
			label="Primary Address" 
			CV="1" 
			comment="Short address"
			item="Short Address"  
			default="03">
			<shortAddressVal/>
		</variable>

		<variable 
			label="Primary Address" 
			CV="1" 
			comment="Short address"
			item="Short Address"  
			default="03"
			writeOnly="yes">
			<shortAddressVal/>
		</variable>

		<variable 
			label="Acceleration momentum" 
			CV="3" 
			default="5"
			item="Accel">
			<decVal max="255"/>
		</variable>

		<variable 
			label="Deceleration momentum" 
			CV="4" 
			default="5"
			item="Decel">
			<decVal max="255"/>
		</variable>

		<variable 
			label="Manufacturer ID" 
			CV="8"  
			infoOnly="yes" 
			item="Manufacturer" 
			default="48">
			<decVal/>
		</variable>

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

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

		<!-- Hornby don't support changing this, but it should be written as 1 for consistency -->
		<variable 
			label="Analog Mode" 
			CV="29" 
			mask="XXXXXVXX"
			item="Analog Mode" 
			default="1"
			writeOnly="yes">
			<decVal min="1" max="1" />
		</variable>
	</variables>
</decoder>
</decoder-config>









