<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!--Copyright (C) JMRI 2003, 2004, 2008 All rights reserved -->
<!--$Id: ESU_LokPilotBasic1.0.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="Jeff Schmaltz escopetas@comcast.net" version="1.1" lastUpdated="20090218"/>
  <version author="Jeff Schmaltz escopetas@comcast.net" version="1.0" lastUpdated="20080131"/>
<!--
     This decoder configuration file is based on ESU_LokPilotDCC.xml
     V 4, dated 20050619, by Walter Thompson. Which also acknowledged
     "the contribution of many others" including 'jake'.

     Based on the "LokPilot Basic - BEMF for all your engines" 2-page
     instructions, P/N 04507-05795.

     This decoder XML is meant to be used with the "Comprehensive" programmer format.
     Continued the practice of using unrelated "item" names to place ESU unique
     variables on the proper pane of the Comprehensive programmer.

     Any and all feedback on this file would be appreciated.

     Version History:

        1.0 - Initial release 31 Jan 2008

        1.1 - 18 Feb 2009
              Added family lowVersionID & highVersionID, range 0-255 because CV 7 doesn't seem
                 to match software version number
-->
  <decoder>
    <family name="ESU LokPilot Basic 1.0" mfg="Electronic Solutions Ulm GmbH" lowVersionID="0" highVersionID="255">
      <model model="LokPilot Basic 1.0" maxInputVolts="25 V" maxMotorCurrent="0.7 A" maxTotalCurrent="1.05 A" numOuts="3" numFns="5" formFactor="HO" connector="NMRAmedium">
        <output name="1" label="Front light" maxcurrent="180 mA" connection="wire"/>
        <output name="2" label="Rear light " maxcurrent="180 mA" connection="wire"/>
        <output name="3" label="   AUX1    " maxcurrent="180 mA" connection="wire"/>
        <size length="25.5" width="15.5" height="4.5" units="mm"/>
      </model>
    </family>
    <programming direct="yes" paged="yes" register="yes" ops="yes"/>
    <variables>
      <variable label="Short Address" CV="1" default="3" item="Short Address" tooltip="Only if CV29, Bit5=0 CV1">
        <shortAddressVal/>
        <label>Short Address</label>
      </variable>
      <variable label="Starting Voltage" CV="2" default="3" item="Vstart" tooltip="Determines the starting speed, range 1-63. CV2">
        <decVal min="1" max="63"/>
        <label>Starting Voltage</label>
      </variable>
      <variable label="Acceleration" CV="3" default="8" item="Accel" tooltip="This value multiplied by 0.5 gives the time from stop to maximum speed, range 1-63. CV3">
        <decVal min="1" max="63"/>
        <label>Acceleration</label>
      </variable>
      <variable label="Deceleration" CV="4" default="6" item="Decel" tooltip="This value multiplied by 0.5 gives the time from maximum speed to stop, range 1-63. CV4">
        <decVal min="1" max="64"/>
        <label>Deceleration</label>
      </variable>
      <variable label="Maximum Speed" CV="5" default="63" item="Vhigh" tooltip="Maximum speed of locomotive, range 1-63. CV5">
        <decVal min="1" max="63"/>
        <label>Maximum Speed</label>
      </variable>
      <variable label="Software Version Number" CV="7" item="Decoder Version" tooltip="The decoder version number (read only) CV7">
        <decVal/>
        <label>Software Version Number</label>
      </variable>
      <variable label="Manufacturer ID" CV="8" readOnly="yes" default="151" item="Manufacturer" tooltip="The manufacturer's ID number (read only) CV8">
        <decVal/>
        <label>Manufacturer ID</label>
      </variable>
      <variable label="Long Address" CV="17" item="Extended Address" comment="4 digit address (Range 0001-9999)">
        <longAddressVal/>
        <label>Long Address</label>
        <comment>4 digit address (Range 0001-9999)</comment>
      </variable>
      <variable label="Direction of Travel" CV="29" mask="XXXXXXXV" default="0" item="Locomotive Direction" tooltip="Sets the relative direction of the loco when told to move forward CV29">
        <enumVal>
          <enumChoice choice="Normal direction of travel">
            <choice>Normal direction of travel</choice>
          </enumChoice>
          <enumChoice choice="Reverse direction of travel">
            <choice>Reverse direction of travel</choice>
          </enumChoice>
        </enumVal>
        <label>Direction of Travel</label>
      </variable>
      <variable label="Speed Steps" CV="29" mask="XXXXXXVX" default="1" item="Speed Step Mode" tooltip="Sets the speed step mode. 128 speed steps are recognized automatically CV29">
        <enumVal>
          <enumChoice choice="14">
            <choice>14</choice>
          </enumChoice>
          <enumChoice choice="28/128">
            <choice>28/128</choice>
          </enumChoice>
        </enumVal>
        <label>Speed Steps</label>
      </variable>
      <variable label="Analogue mode" CV="29" mask="XXXXXVXX" default="1" item="Analog (DC) Operation" tooltip="Determines whether loco can operate on conventional DC current (enables Power Source Conversion) CV29">
        <enumVal>
          <enumChoice choice="Digital Operation Only">
            <choice>Digital Operation Only</choice>
          </enumChoice>
          <enumChoice choice="Digital + Analog Operation">
            <choice>Digital + Analog Operation</choice>
          </enumChoice>
        </enumVal>
        <label>Analogue mode</label>
      </variable>
      <variable label="Selection of address" CV="29" mask="XXVXXXXX" default="0" item="Address Format" tooltip="Determines whether loco will use short or long address CV29">
        <enumVal>
          <enumChoice choice="Short Address (CV1)">
            <choice>Short Address (CV1)</choice>
          </enumChoice>
          <enumChoice choice="Long Address (CV17+18)">
            <choice>Long Address (CV17+18)</choice>
          </enumChoice>
        </enumVal>
        <label>Selection of address</label>
      </variable>
      <variable label="BEMF control" CV="49" mask="XXXXXXXV" default="1" item="EMF Static Config" tooltip="CV49">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="Active">
            <choice>Active</choice>
          </enumChoice>
        </enumVal>
        <label>BEMF control</label>
      </variable>
      <variable label="Brake mode control" CV="51" mask="XXXXXXXV" default="1" item="Dither option" tooltip="CV51">
        <enumVal>
          <enumChoice choice="Off">
            <choice>Off</choice>
          </enumChoice>
          <enumChoice choice="Active">
            <choice>Active</choice>
          </enumChoice>
        </enumVal>
        <label>Brake mode control</label>
      </variable>
      <variable label="Load control parameter K" CV="54" default="32" item="EMF Dynamic Config" tooltip="Determines how strongly load control effects, range 0-63. CV54">
        <decVal min="0" max="63"/>
        <label>Load control parameter K</label>
      </variable>
      <variable label="Load control parameter I" CV="55" default="24" item="EMF Droop Config" tooltip="Determines the momentum of the motor, range 0-63. CV55">
        <decVal min="0" max="63"/>
        <label>Load control parameter I</label>
      </variable>
      <variable label="Lamp brightness" CV="63" default="7" item="Global lighting option 1" tooltip="Defines the brightness of the function outputs, range 0-7, CV63">
        <decVal min="0" max="7"/>
        <label>Lamp brightness</label>
      </variable>
    </variables>
    <resets>
      <factReset label="HARD RESET all CVs reset to default values" CV="8" default="8"/>
    </resets>
  </decoder>
</decoder-config>

