<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="http://jmri.sourceforge.net/xml/XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2004 All rights reserved -->
<!-- $Id: HornbyDigital.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 showEmptyPanes="no" 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="John McAleely john@mcaleely.com" version="3" lastUpdated="20080502" />
  <!-- 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">
      <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/>
        <label>Primary Address</label>
        <comment>Short address</comment>
      </variable>
      <variable label="Primary Address" CV="1" comment="Short address" item="Short Address" default="03" writeOnly="yes">
        <shortAddressVal/>
        <label>Primary Address</label>
        <comment>Short address</comment>
      </variable>
      <variable label="Acceleration momentum" CV="3" default="5" item="Accel">
        <decVal max="255"/>
        <label>Acceleration momentum</label>
      </variable>
      <variable label="Deceleration momentum" CV="4" default="5" item="Decel">
        <decVal max="255"/>
        <label>Deceleration momentum</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" infoOnly="yes" item="Manufacturer" default="48">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="Normal direction of motion" CV="29" mask="XXXXXXXV" default="0" item="Locomotive Direction" writeOnly="yes">
        <enumVal>
          <enumChoice choice="Forward">
            <choice>Forward</choice>
          </enumChoice>
          <enumChoice choice="Reverse">
            <choice>Reverse</choice>
          </enumChoice>
        </enumVal>
        <label>Normal direction of motion</label>
      </variable>
      <variable label="Speed Steps" CV="29" mask="XXXXXXVX" item="Speed Step Mode" default="1" writeOnly="yes">
        <enumVal>
          <enumChoice choice="14">
            <choice>14</choice>
          </enumChoice>
          <enumChoice choice="28/128 (recommended)">
            <choice>28/128 (recommended)</choice>
          </enumChoice>
        </enumVal>
        <label>Speed Steps</label>
      </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"/>
        <label>Analog Mode</label>
      </variable>
    </variables>
  </decoder>
</decoder-config>

