<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2005 All rights reserved -->
<!--                                                                        -->
<!-- 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-4-15-2.xsd">
  <version author="Greg Watkins gregd99@yahoo.com" version="2" lastUpdated="20100528"/>
  <!-- 
	This is my first attempt to write a decoder description file.
	All feedback welcome.
-->
  <!--
nmraWarrant="yes" nmraWarrantStart="2009-005"
-->
  <decoder>
    <family name="Sapphire-R8245" mfg="Hornby" highVersionID="10" lowVersionID="10" comment="Decoder with auntomous loco control and fuel/water simulation">
      <model model="Sapphire-R8245" numOuts="4" numFns="4" maxMotorCurrent="1.0A (peak=1.5A)" formFactor="0O">
        <output name="1" label="1 - White"/>
        <output name="2" label="2 - Yellow"/>
        <output name="3" label="3 - Green"/>
        <output name="4" label="4 - Purple"/>
      </model>
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/nmra/shortAndLongAddress.xml"/>
      <!-- Variables XML generated by script -->
      <!-- this is a target comment- line 2 -->
      <!-- this is a target comment- line 3 -->
      <!-- CV 2 -->
      <variable CV="2" default="0" item="Vstart" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Vstart</label>
        <label xml:lang="it">Volt Partenza</label>
        <label xml:lang="fr">V démarr.</label>
        <label xml:lang="de">Startspannung</label>
      </variable>
      <!-- CV 3 -->
      <variable CV="3" default="5" item="Accel" tooltip="(0 -255) default=5">
        <decVal min="0" max="255"/>
        <label>Acceleration Rate</label>
        <label xml:lang="it">Accellerazione (0-255)</label>
        <label xml:lang="fr">Accelération (0-255)</label>
        <label xml:lang="de">Anfahrverzögerung (0-255)</label>
      </variable>
      <!-- CV 4 -->
      <variable CV="4" default="5" item="Decel" tooltip="(0 -255) default=5">
        <decVal min="0" max="255"/>
        <label>Deceleration Rate</label>
        <label xml:lang="it">Decellerazione (1-255)</label>
        <label xml:lang="fr">Décélération (1-255)</label>
        <label xml:lang="de">Bremszeit (1-255)</label>
      </variable>
      <!-- CV 5 -->
      <variable CV="5" default="255" item="Vhigh" tooltip="(0 -255) default=255">
        <decVal min="0" max="255"/>
        <label>Vhigh</label>
        <label xml:lang="it">Volt Massimi (0-255):</label>
        <label xml:lang="de">Höchstgeschwindigkeit</label>
      </variable>
      <!-- CV 6 -->
      <variable CV="6" default="48" item="Vmid" tooltip="(0 -255) default=48">
        <decVal min="0" max="255"/>
        <label>Vmid</label>
        <label xml:lang="it">Volts intermedi (0-255)</label>
        <label xml:lang="de">Vmittel (0-255)</label>
      </variable>
      <!-- CV 7 -->
      <variable CV="7" default="10" item="Decoder Version" readOnly="yes" tooltip="Readonly default=10">
        <decVal/>
        <label>Manufacturer Version No: </label>
        <label xml:lang="it">Versione Decoder: </label>
        <label xml:lang="fr">Version décodeur: </label>
        <label xml:lang="de">Decoder Version: </label>
      </variable>
      <!-- CV 8 -->
      <variable CV="8" default="48" item="Manufacturer" readOnly="yes" tooltip="Readonly default=48">
        <decVal/>
        <label>Manufacturer ID: </label>
        <label xml:lang="it">ID Costruttore: </label>
        <label xml:lang="fr">ID constructeur: </label>
        <label xml:lang="de">Hersteller ID: </label>
      </variable>
      <!-- CV 10 -->
      <variable CV="10" default="128" item="EMF Feedback Cutout" tooltip="(1 -128) default=128">
        <decVal min="1" max="128"/>
        <label>EMF Feedback Cutout</label>
      </variable>
      <!-- CV 17 -->
      <!-- CV 19 -->
      <xi:include href="http://jmri.org/xml/decoders/nmra/consistAddrDirection.xml"/>
      <!-- CV 28 -->
      <variable CV="28" mask="XXXXXXXV" default="1" item="RailCom Address" tooltip="XXXXXXXV  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>RailCom Address</label>
      </variable>
      <!-- CV 28 -->
      <variable CV="28" mask="XXXXXXVX" default="1" item="RailCom Data" tooltip="XXXXXXVX  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>RailCom Data</label>
      </variable>
      <!-- CV 28 -->
      <variable CV="28" mask="XXXXXVXX" default="1" item="RailCom Command" tooltip="XXXXXVXX  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-disabledEnabled.xml"/>
        <label>RailCom Command</label>
      </variable>
      <!-- CV 29 -->
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29direction.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29speedSteps.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29analog.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29RailCom.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/nmra/cv29table3-28.xml"/>
      <!-- CV 29 -->
      <variable CV="29" mask="VXXXXXXX" default="0" item="Decoder Type" tooltip="VXXXXXXX  default=0">
        <enumVal>
          <enumChoice choice="MultiFuncton"/>
          <enumChoice choice="Accessory"/>
        </enumVal>
        <label>Decoder Type</label>
      </variable>
      <!-- CV 30 -->
      <variable CV="30" mask="XXXXXXXV" item="Motor short-circuit" readOnly="yes" tooltip="XXXXXXXV  Readonly">
        <enumVal>
          <enumChoice choice="OK"/>
          <enumChoice choice="NOK"/>
        </enumVal>
        <label>Motor short-circuit</label>
      </variable>
      <!-- CV 30 -->
      <variable CV="30" mask="XXXXXXVX" item="Output 0-1 short-circuit" readOnly="yes" tooltip="XXXXXXVX  Readonly">
        <enumVal>
          <enumChoice choice="OK"/>
          <enumChoice choice="NOK"/>
        </enumVal>
        <label>Output 0-1 short-circuit</label>
      </variable>
      <!-- CV 30 -->
      <variable CV="30" mask="XXXXXVXX" item="Output 2-3 short-circuit" readOnly="yes" tooltip="XXXXXVXX  Readonly">
        <enumVal>
          <enumChoice choice="OK"/>
          <enumChoice choice="NOK"/>
        </enumVal>
        <label>Output 2-3 short-circuit</label>
      </variable>
      <!-- CV 33 -->
      <variable CV="33" mask="XXXXXXXV" default="1" item="FL(f) controls output 1" tooltip="XXXXXXXV  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(f) controls output 1</label>
      </variable>
      <!-- CV 33 -->
      <variable CV="33" mask="XXXXXXVX" default="0" item="FL(f) controls output 2" tooltip="XXXXXXVX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(f) controls output 2</label>
      </variable>
      <!-- CV 33 -->
      <variable CV="33" mask="XXXXXVXX" default="0" item="FL(f) controls output 3" tooltip="XXXXXVXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(f) controls output 3</label>
      </variable>
      <!-- CV 33 -->
      <variable CV="33" mask="XXXXVXXX" default="0" item="FL(f) controls output 4" tooltip="XXXXVXXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(f) controls output 4</label>
      </variable>
      <!-- CV 34 -->
      <variable CV="34" mask="XXXXXXXV" default="0" item="FL(r) controls output 1" tooltip="XXXXXXXV  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(r) controls output 1</label>
      </variable>
      <!-- CV 34 -->
      <variable CV="34" mask="XXXXXXVX" default="1" item="FL(r) controls output 2" tooltip="XXXXXXVX  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(r) controls output 2</label>
      </variable>
      <!-- CV 34 -->
      <variable CV="34" mask="XXXXXVXX" default="0" item="FL(r) controls output 3" tooltip="XXXXXVXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(r) controls output 3</label>
      </variable>
      <!-- CV 34 -->
      <variable CV="34" mask="XXXXVXXX" default="0" item="FL(r) controls output 4" tooltip="XXXXVXXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>FL(r) controls output 4</label>
      </variable>
      <!-- CV 35 -->
      <variable CV="35" mask="XXXXXXXV" default="0" item="F1 controls output 1" tooltip="XXXXXXXV  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F1 controls output 1</label>
      </variable>
      <!-- CV 35 -->
      <variable CV="35" mask="XXXXXXVX" default="0" item="F1 controls output 2" tooltip="XXXXXXVX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F1 controls output 2</label>
      </variable>
      <!-- CV 35 -->
      <variable CV="35" mask="XXXXXVXX" default="1" item="F1 controls output 3" tooltip="XXXXXVXX  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F1 controls output 3</label>
      </variable>
      <!-- CV 35 -->
      <variable CV="35" mask="XXXXVXXX" default="0" item="F1 controls output 4" tooltip="XXXXVXXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F1 controls output 4</label>
      </variable>
      <!-- CV 36 -->
      <variable CV="36" mask="XXXXXXXV" default="0" item="F2 controls output 1" tooltip="XXXXXXXV  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F2 controls output 1</label>
      </variable>
      <!-- CV 36 -->
      <variable CV="36" mask="XXXXXXVX" default="0" item="F2 controls output 2" tooltip="XXXXXXVX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F2 controls output 2</label>
      </variable>
      <!-- CV 36 -->
      <variable CV="36" mask="XXXXXVXX" default="0" item="F2 controls output 3" tooltip="XXXXXVXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F2 controls output 3</label>
      </variable>
      <!-- CV 36 -->
      <variable CV="36" mask="XXXXVXXX" default="1" item="F2 controls output 4" tooltip="XXXXVXXX  default=1">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes-0_1.xml"/>
        <label>F2 controls output 4</label>
      </variable>
      <!-- CV 50 -->
      <variable CV="50" default="0" item="Clock - hours" opsOnly="yes" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Clock - hours</label>
      </variable>
      <!-- CV 51 -->
      <variable CV="51" default="0" item="Clock - mins" opsOnly="yes" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Clock - mins</label>
      </variable>
      <!-- CV 52 -->
      <variable CV="52" mask="XXXXXXXV" default="0" item="ABC activated" tooltip="XXXXXXXV  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>ABC activated</label>
      </variable>
      <!-- CV 52 -->
      <variable CV="52" mask="XXXXXXVX" default="0" item="ABC direction-dependency deactivated" tooltip="XXXXXXVX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>ABC direction-dependency deactivated</label>
      </variable>
      <!-- CV 52 -->
      <variable CV="52" mask="XXXXXVXX" default="0" item="Activate push-pull operation with intermediate stop" tooltip="XXXXXVXX  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-NoYes.xml"/>
        <label>Activate push-pull operation with intermediate stop</label>
      </variable>
      <!-- CV 53 -->
      <variable CV="53" default="3" item="Intermediate stopping time" tooltip="(0 -255) default=3">
        <decVal min="0" max="255"/>
        <label>Intermediate stopping time</label>
      </variable>
      <!-- CV 67 -->
      <variable CV="67" item="Speed Table">
        <speedTableVal/>
        <label>Speed Table</label>
      </variable>
      <!-- CV 105 -->
      <variable CV="105" default="255" item="User Id #1" tooltip="(0 -255) default=255">
        <decVal min="0" max="255"/>
        <label>User Id #1</label>
      </variable>
      <!-- CV 106 -->
      <variable CV="106" default="255" item="User Id #2" tooltip="(0 -255) default=255">
        <decVal min="0" max="255"/>
        <label>User Id #2</label>
      </variable>
      <!-- CV 111 -->
      <variable CV="111" default="20" item="Signal Timeout" tooltip="(0 -255) default=20">
        <decVal min="0" max="255"/>
        <label>Signal Timeout</label>
      </variable>
      <!-- CV 112 -->
      <variable CV="112" mask="XXXXXXXV" default="0" item="Shunting Mode" tooltip="XXXXXXXV  default=0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OffOn.xml"/>
        <label>Shunting Mode</label>
      </variable>
      <!-- CV 113 -->
      <variable CV="113" mask="XXXXXXVV" default="0" item="Light effect of function output 0" tooltip="XXXXXXVV  default=0">
        <enumVal>
          <enumChoice choice="Steady" value="0"/>
          <enumChoice choice="Strobe" value="1"/>
          <enumChoice choice="Flicker" value="2"/>
          <enumChoice choice="Flash" value="3"/>
        </enumVal>
        <label>Light effect of function output 0</label>
      </variable>
      <!-- CV 114 -->
      <variable CV="114" mask="XXXXXXVV" default="0" item="Light effect of function output 1" tooltip="XXXXXXVV  default=0">
        <enumVal>
          <enumChoice choice="Steady" value="0"/>
          <enumChoice choice="Strobe" value="1"/>
          <enumChoice choice="Flicker" value="2"/>
          <enumChoice choice="Flash" value="3"/>
        </enumVal>
        <label>Light effect of function output 1</label>
      </variable>
      <!-- CV 115 -->
      <variable CV="115" mask="XXXXXXVV" default="0" item="Light effect of function output 2" tooltip="XXXXXXVV  default=0">
        <enumVal>
          <enumChoice choice="Steady" value="0"/>
          <enumChoice choice="Strobe" value="1"/>
          <enumChoice choice="Flicker" value="2"/>
          <enumChoice choice="Flash" value="3"/>
        </enumVal>
        <label>Light effect of function output 2</label>
      </variable>
      <!-- CV 116 -->
      <variable CV="116" mask="XXXXXXVV" default="0" item="Light effect of function output 3" tooltip="XXXXXXVV  default=0">
        <enumVal>
          <enumChoice choice="Steady" value="0"/>
          <enumChoice choice="Strobe" value="1"/>
          <enumChoice choice="Flicker" value="2"/>
          <enumChoice choice="Flash" value="3"/>
        </enumVal>
        <label>Light effect of function output 3</label>
      </variable>
      <!-- CV 117 -->
      <variable CV="117" default="15" item="Dimming Value for Output 0" tooltip="(0 -15) default=15">
        <decVal min="0" max="15"/>
        <label>Dimming Value for Output 0</label>
      </variable>
      <!-- CV 118 -->
      <variable CV="118" default="15" item="Dimming Value for Output 1" tooltip="(0 -15) default=15">
        <decVal min="0" max="15"/>
        <label>Dimming Value for Output 1</label>
      </variable>
      <!-- CV 119 -->
      <variable CV="119" default="15" item="Dimming Value for Output 2" tooltip="(0 -15) default=15">
        <decVal min="0" max="15"/>
        <label>Dimming Value for Output 2</label>
      </variable>
      <!-- CV 120 -->
      <variable CV="120" default="15" item="Dimming Value for Output 3" tooltip="(0 -15) default=15">
        <decVal min="0" max="15"/>
        <label>Dimming Value for Output 3</label>
      </variable>
      <!-- CV 121 -->
      <variable CV="121" default="0" item="Delay time - hours" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Delay time - hours</label>
      </variable>
      <!-- CV 122 -->
      <variable CV="122" default="0" item="Delay time - mins" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Delay time - mins</label>
      </variable>
      <!-- CV 123 -->
      <variable CV="123" default="0" item="Delay time - secs" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Delay time - secs</label>
      </variable>
      <!-- CV 124 -->
      <variable CV="124" mask="XVVVVVVV" default="0" item="Event 1 - speed" tooltip="XVVVVVVV  (0 -127) default=0">
        <decVal min="0" max="127"/>
        <label>Event 1 - speed</label>
      </variable>
      <!-- CV 124 -->
      <variable CV="124" mask="VXXXXXXX" default="0" item="Event 1 - direction" tooltip="VXXXXXXX  default=0">
        <enumVal>
          <enumChoice choice="Forward" value="0"/>
          <enumChoice choice="Reverse" value="1"/>
        </enumVal>
        <label>Event 1 - direction</label>
      </variable>
      <!-- CV 125 -->
      <variable CV="125" default="0" item="Event 1 - hours" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Event 1 - hours</label>
      </variable>
      <!-- CV 126 -->
      <variable CV="126" default="0" item="Event 1 - mins" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 1 - mins</label>
      </variable>
      <!-- CV 127 -->
      <variable CV="127" default="0" item="Event 1 - secs" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 1 - secs</label>
      </variable>
      <!-- CV 128 -->
      <variable CV="128" mask="XVVVVVVV" default="0" item="Event 2 - speed" tooltip="XVVVVVVV  (0 -127) default=0">
        <decVal min="0" max="127"/>
        <label>Event 2 - speed</label>
      </variable>
      <!-- CV 128 -->
      <variable CV="128" mask="VXXXXXXX" default="0" item="Event 2 - direction" tooltip="VXXXXXXX  default=0">
        <enumVal>
          <enumChoice choice="Forward" value="0"/>
          <enumChoice choice="Reverse" value="1"/>
        </enumVal>
        <label>Event 2 - direction</label>
      </variable>
      <!-- CV 129 -->
      <variable CV="129" default="0" item="Event 2 - hours" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Event 2 - hours</label>
      </variable>
      <!-- CV 130 -->
      <variable CV="130" default="0" item="Event 2 - mins" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 2 - mins</label>
      </variable>
      <!-- CV 131 -->
      <variable CV="131" default="0" item="Event 2 - secs" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 2 - secs</label>
      </variable>
      <!-- CV 132 -->
      <variable CV="132" mask="XVVVVVVV" default="0" item="Event 3 - speed" tooltip="XVVVVVVV  (0 -127) default=0">
        <decVal min="0" max="127"/>
        <label>Event 3 - speed</label>
      </variable>
      <!-- CV 132 -->
      <variable CV="132" mask="VXXXXXXX" default="0" item="Event 3 - direction" tooltip="VXXXXXXX  default=0">
        <enumVal>
          <enumChoice choice="Forward" value="0"/>
          <enumChoice choice="Reverse" value="1"/>
        </enumVal>
        <label>Event 3 - direction</label>
      </variable>
      <!-- CV 133 -->
      <variable CV="133" default="0" item="Event 3 - hours" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Event 3 - hours</label>
      </variable>
      <!-- CV 134 -->
      <variable CV="134" default="0" item="Event 3 - mins" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 3 - mins</label>
      </variable>
      <!-- CV 135 -->
      <variable CV="135" default="0" item="Event 3 - secs" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 3 - secs</label>
      </variable>
      <!-- CV 136 -->
      <variable CV="136" mask="XVVVVVVV" default="0" item="Event 4 - speed" tooltip="XVVVVVVV  (0 -127) default=0">
        <decVal min="0" max="127"/>
        <label>Event 4 - speed</label>
      </variable>
      <!-- CV 136 -->
      <variable CV="136" mask="VXXXXXXX" default="0" item="Event 4 - direction" tooltip="VXXXXXXX  default=0">
        <enumVal>
          <enumChoice choice="Forward" value="0"/>
          <enumChoice choice="Reverse" value="1"/>
        </enumVal>
        <label>Event 4 - direction</label>
      </variable>
      <!-- CV 137 -->
      <variable CV="137" default="0" item="Event 4 - hours" tooltip="(0 -23) default=0">
        <decVal min="0" max="23"/>
        <label>Event 4 - hours</label>
      </variable>
      <!-- CV 138 -->
      <variable CV="138" default="0" item="Event 4 - mins" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 4 - mins</label>
      </variable>
      <!-- CV 139 -->
      <variable CV="139" default="0" item="Event 4 - secs" tooltip="(0 -59) default=0">
        <decVal min="0" max="59"/>
        <label>Event 4 - secs</label>
      </variable>
      <!-- CV 140 -->
      <variable CV="140" default="0" item="Event Control" tooltip="default=0">
        <enumVal>
          <enumChoice choice="None" value="0"/>
          <enumChoice choice="E1" value="1"/>
          <enumChoice choice="E1-2" value="2"/>
          <enumChoice choice="E1-3" value="3"/>
          <enumChoice choice="E1-4" value="4"/>
          <enumChoice choice="E1-2 Repeat" value="10"/>
          <enumChoice choice="E1-3 Repeat" value="11"/>
          <enumChoice choice="E1-4 Repeat" value="12"/>
        </enumVal>
        <label>Event Control</label>
      </variable>
      <!-- CV 142 -->
      <variable CV="142" default="0" item="Current Fuel or Coal" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Current Fuel or Coal</label>
      </variable>
      <!-- CV 143 -->
      <variable CV="143" default="0" item="Current Water" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Current Water</label>
      </variable>
      <!-- CV 144 -->
      <variable CV="144" default="0" item="Initial Fuel or Coal" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Initial Fuel or Coal</label>
      </variable>
      <!-- CV 145 -->
      <variable CV="145" default="0" item="Initial Water" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Initial Water</label>
      </variable>
      <!-- CV 146 -->
      <variable CV="146" mask="XXXXXXXV" default="0" item="Simulation" tooltip="XXXXXXXV  default=0">
        <enumVal>
          <enumChoice choice="Off" value="0"/>
          <enumChoice choice="On" value="1"/>
        </enumVal>
        <label>Simulation</label>
      </variable>
      <!-- CV 146 -->
      <variable CV="146" mask="XXXXXXVX" default="0" item="Lights on empty" tooltip="XXXXXXVX  default=0">
        <enumVal>
          <enumChoice choice="Off" value="0"/>
          <enumChoice choice="On" value="1"/>
        </enumVal>
        <label>Lights on empty</label>
      </variable>
      <!-- CV 150 -->
      <variable CV="150" mask="XXXXXXVV" default="0" item="Motor Option 1" tooltip="XXXXXXVV  default=0">
        <enumVal>
          <enumChoice choice="Intrain V1.3" value="0"/>
          <enumChoice choice="New PID" value="1"/>
          <enumChoice choice="New PID tune for Lima" value="2"/>
        </enumVal>
        <label>PID algorithm</label>
      </variable>
      <!-- CV 894 -->
      <variable CV="894" default="0" item="Current Fuel or Coal#2" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Current Fuel or Coal#2</label>
      </variable>
      <!-- CV 895 -->
      <variable CV="895" default="0" item="Current Water#2" tooltip="(0 -255) default=0">
        <decVal min="0" max="255"/>
        <label>Current Water#2</label>
      </variable>
    </variables>
    <resets>
      <factReset label="Reset All CVs" CV="8" default="33">
        <label xml:lang="it">Reset delle CV ai valori di fabbrica</label>
      </factReset>
    </resets>
  </decoder>
  <pane>
    <name>Hornby</name>
    <column>
      <row>
        <column>
          <label>
            <text>RailCom Configuration</text>
          </label>
          <display item="Enable RailCom"/>
          <label>
            <text> </text>
          </label>
          <display item="RailCom Address"/>
          <display item="RailCom Data"/>
          <display item="RailCom Command"/>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text>          </text>
          </label>
        </column>
        <column>
          <label>
            <text>Braking Configuration</text>
          </label>
          <display item="ABC activated"/>
          <label>
            <text> </text>
          </label>
          <display item="ABC direction-dependency deactivated"/>
          <display item="Activate push-pull operation with intermediate stop"/>
          <display item="Intermediate stopping time"/>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
      <separator/>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Fault Indication</text>
          </label>
          <display item="Motor short-circuit"/>
          <display item="Output 0-1 short-circuit"/>
          <display item="Output 2-3 short-circuit"/>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text>          </text>
          </label>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Shunting Mode Config</text>
          </label>
          <display item="Shunting Mode"/>
          <label>
            <text> </text>
          </label>
          <label>
            <text> </text>
          </label>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
      <separator/>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Signal Timeout Configuration</text>
          </label>
          <display item="Signal Timeout"/>
          <label>
            <text> </text>
          </label>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text>          </text>
          </label>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Decoder clock (Ops Mode only)</text>
          </label>
          <display item="Clock - hours"/>
          <display item="Clock - mins"/>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
    </column>
  </pane>
  <pane>
    <name>Hornby Lights</name>
    <column>
      <label>
        <text> </text>
      </label>
      <display item="Light effect of function output 0"/>
      <display item="Light effect of function output 1"/>
      <display item="Light effect of function output 2"/>
      <display item="Light effect of function output 3"/>
      <label>
        <text> </text>
      </label>
      <separator/>
      <label>
        <text> </text>
      </label>
      <row>
        <column>
          <display item="Dimming Value for Output 0"/>
          <display item="Dimming Value for Output 1"/>
          <display item="Dimming Value for Output 2"/>
          <display item="Dimming Value for Output 3"/>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <display item="Dimming Value for Output 0" label="  " format="hslider"/>
          <display item="Dimming Value for Output 1" label="  " format="hslider"/>
          <display item="Dimming Value for Output 2" label="  " format="hslider"/>
          <display item="Dimming Value for Output 3" label="  " format="hslider"/>
        </column>
      </row>
    </column>
  </pane>
  <pane>
    <name>Hornby Events</name>
    <column>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Auto control Locomotive can start/stop based upon timer events,</text>
          </label>
          <label>
            <text>without input from the Command Station.</text>
          </label>
          <label>
            <text> </text>
          </label>
          <separator/>
        </column>
      </row>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <display item="Event Control"/>
          <label>
            <text> </text>
          </label>
          <separator/>
        </column>
      </row>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Start time</text>
          </label>
          <display item="Delay time - hours"/>
          <display item="Delay time - mins"/>
          <display item="Delay time - secs"/>
          <label>
            <text> </text>
          </label>
          <separator/>
        </column>
      </row>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Event 1</text>
          </label>
          <display item="Event 1 - speed"/>
          <display item="Event 1 - direction"/>
          <display item="Event 1 - hours"/>
          <display item="Event 1 - mins"/>
          <display item="Event 1 - secs"/>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Event 2</text>
          </label>
          <display item="Event 2 - speed"/>
          <display item="Event 2 - direction"/>
          <display item="Event 2 - hours"/>
          <display item="Event 2 - mins"/>
          <display item="Event 2 - secs"/>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text>        </text>
          </label>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Event 3</text>
          </label>
          <display item="Event 3 - speed"/>
          <display item="Event 3 - direction"/>
          <display item="Event 3 - hours"/>
          <display item="Event 3 - mins"/>
          <display item="Event 3 - secs"/>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Event 4</text>
          </label>
          <display item="Event 4 - speed"/>
          <display item="Event 4 - direction"/>
          <display item="Event 4 - hours"/>
          <display item="Event 4 - mins"/>
          <display item="Event 4 - secs"/>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
    </column>
  </pane>
  <pane>
    <name>Hornby Simulation</name>
    <column>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Coal/Fuel and Water for simulated use by loco</text>
          </label>
          <label>
            <text> </text>
          </label>
          <separator/>
        </column>
      </row>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text>Simulation Control</text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Simulation"/>
          <display item="Lights on empty"/>
          <label>
            <text> </text>
          </label>
          <separator/>
        </column>
      </row>
      <row>
        <column>
          <label>
            <text> </text>
          </label>
          <display item="Initial Fuel or Coal"/>
          <display item="Initial Water"/>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <display item="Initial Fuel or Coal" label=" " format="hslider"/>
          <display item="Initial Water" label="" format="hslider"/>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
      <separator/>
      <row>
        <column>
          <!-- <label label="CV142/3"/> -->
          <label>
            <text> </text>
          </label>
          <display item="Current Fuel or Coal"/>
          <display item="Current Water"/>
          <label>
            <text> </text>
          </label>
        </column>
        <column>
          <label>
            <text> </text>
          </label>
          <label>
            <text> </text>
          </label>
          <display item="Current Fuel or Coal" label=" " format="hslider"/>
          <display item="Current Water" label="" format="hslider"/>
          <label>
            <text> </text>
          </label>
        </column>
      </row>
      <!-- These CVs not accessible except in ops mode
		<separator/>

		<row>
			<column>
				<label label=" "/>
				<display item="Current Fuel or Coal#2" />
				<display item="Current Water#2" />
				<label label=" "/>
			</column>

			<column>
				<label label=" "/>
				<display item="Current Fuel or Coal#2" label = " " format="hslider" />
				<display item="Current Water#2" label = " " format="hslider"/>
				<label label=" "/>
			</column>
			
		</row>
		<separator/>
-->
    </column>
  </pane>
</decoder-config>
