<?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, 2008 All rights reserved -->
<!--$Id: ESU_LokPilotBasic1.0.xml,v 1.2 2009/02/22 22:34:13 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="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" >
			<size length="25.5" width="15.5" height="4.5" units="mm" />
			<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" />
		</model>
	</family>

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

	<variables>

		<variable label="Short Address" CV="1" default="3"
			item="Short Address"
			tooltip="Only if CV29, Bit5=0 CV1">
			<shortAddressVal/>
            	</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"/>
		</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"/>
		</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"/>
		</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"/>
		</variable>

		<variable label="Software Version Number" CV="7"
			item="Decoder Version"
			tooltip="The decoder version number (read only) CV7" >
			<decVal/>
		</variable>

		<variable label="Manufacturer ID" CV="8" readOnly="yes" default="151"
			item="Manufacturer"
			tooltip="The manufacturer's ID number (read only) CV8">
			<decVal/>
		</variable>

		<variable label="Long Address" CV="17" item="Extended Address"
		        comment="4 digit address (Range 0001-9999)">
			<longAddressVal/>
		</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"/>
				<enumChoice choice="Reverse direction of travel"/>
			</enumVal>
		</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"/>
				<enumChoice choice="28/128"/>
			</enumVal>
		</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"/>
				<enumChoice choice="Digital + Analog Operation"/>
			</enumVal>
		</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)"/>
				<enumChoice choice="Long Address (CV17+18)"/>
			</enumVal>
		</variable>

		<variable label="BEMF control" CV="49" mask="XXXXXXXV" default="1"
			item="EMF Static Config"
			tooltip="CV49" >
			<enumVal>
				<enumChoice choice="Off"/>
				<enumChoice choice="Active"/>
			</enumVal>
		</variable>

		<variable label="Brake mode control" CV="51" mask="XXXXXXXV" default="1"
			item="Dither option"
			tooltip="CV51" >
			<enumVal>
				<enumChoice choice="Off"/>
				<enumChoice choice="Active"/>
			</enumVal>
		</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"/>
		</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"/>
		</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"/>
		</variable>
	</variables>

        <resets>
		<factReset label="HARD RESET all CVs reset to default values" CV="8" default="8"/>
        </resets>

</decoder>

</decoder-config>
 	  	 
