<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!-- Copyright (C) JMRI 2001, 2005, 2007, 2-009, 2010 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="Michael Mosher" version="1" lastUpdated="20151016"/>
  <!-- Version 1 New file from 0.14 manual -->
  <version author="Michael Mosher" version="2" lastUpdated="20210630"/>
  <!-- few minor updates  -->
  <decoder>
    <family name="Paragon 3" mfg="Broadway Limited Imports, LLC">
      <model model="Diesel" numOuts="3" numFns="30" connector="9pin">
        <versionCV lowVersionID="0" highVersionID="31"/>
        <output name="1" label="headlight"/>
        <output name="2" label="rearlight"/>
      </model>
      <functionlabels>
        <functionlabel num="0" lockable="true">Headlight</functionlabel>
        <functionlabel num="1" lockable="true">Bell</functionlabel>
        <functionlabel num="2" lockable="false">Horn</functionlabel>
        <functionlabel num="3" lockable="true">Coupler</functionlabel>
        <functionlabel num="4" lockable="true">Compressor</functionlabel>
        <functionlabel num="5" lockable="true">RPM Up</functionlabel>
        <functionlabel num="6" lockable="true">RPM Dn</functionlabel>
        <functionlabel num="7" lockable="true">Smoke Control</functionlabel>
        <functionlabel num="8" lockable="true">Mute/Master Volume</functionlabel>
        <functionlabel num="9" lockable="true">Shutdown and Startup</functionlabel>
        <functionlabel num="10" lockable="true">Cooling Fan</functionlabel>
        <functionlabel num="11" lockable="true">Air Release</functionlabel>
        <functionlabel num="12" lockable="true">Brake Set/Release/Squeal</functionlabel>
        <functionlabel num="13" lockable="true">Horn Grade Crossing</functionlabel>
        <functionlabel num="14" lockable="true">Station Sounds</functionlabel>
        <functionlabel num="15" lockable="true">Yard Sounds</functionlabel>
        <functionlabel num="16" lockable="true">Maintenance Sounds</functionlabel>
        <functionlabel num="17" lockable="true">Radio Chatter</functionlabel>
        <functionlabel num="18" lockable="true">City Sounds</functionlabel>
        <functionlabel num="19" lockable="true">Farm Sounds</functionlabel>
        <functionlabel num="20" lockable="true">Industrial Sounds</functionlabel>
        <functionlabel num="21" lockable="true">Lumber Sounds</functionlabel>
        <functionlabel num="22" lockable="true">Horn2</functionlabel>
        <functionlabel num="23" lockable="true">Track Sounds</functionlabel>
        <functionlabel num="24" lockable="true">Aux Light Control</functionlabel>
        <functionlabel num="25" lockable="true">Long Horn</functionlabel>
        <functionlabel num="26" lockable="true">Play Macro</functionlabel>
        <functionlabel num="27" lockable="true">Record Macro</functionlabel>
        <functionlabel num="28" lockable="true">Brake Squeal</functionlabel>
      </functionlabels>
    </family>
    <programming direct="yes" paged="no" register="yes" ops="yes"/>
    <variables>
      <xi:include href="http://jmri.org/xml/decoders/bli/PxCV.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/bli/P3CV.xml"/>
      <xi:include href="http://jmri.org/xml/decoders/bli/PxCV_Diesel.xml"/>
      <!-- This decoder doesn't do the bit-wise NMRA method of -->
      <!-- assigning functions to outputs. Instead, it has -->
      <!-- a much more civilized system of one CV per function -->
      <variable CV="33" default="1" minFn="1" item="F0 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="34" default="2" minFn="1" item="F1 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="35" default="3" minFn="2" item="F2 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="36" default="17" minFn="3" item="F3 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="37" default="5" minFn="4" item="F4 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="38" default="6" minFn="5" item="F5 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="39" default="7" minFn="6" item="F6 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="40" default="21" minFn="7" item="F7 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="41" default="9" minFn="8" item="F8 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="42" default="10" minFn="9" item="F9 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="43" default="11" minFn="10" item="F10 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="44" default="12" minFn="11" item="F11 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="45" default="13" minFn="12" item="F12 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="46" default="30" minFn="13" item="F13 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="47" default="50" minFn="14" item="F14 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="48" default="51" minFn="15" item="F15 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="49" default="52" minFn="16" item="F16 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="50" default="53" minFn="17" item="F17 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="51" default="54" minFn="18" item="F18 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="52" default="55" minFn="19" item="F19 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="53" default="56" minFn="20" item="F20 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="54" default="57" minFn="21" item="F21 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="55" default="19" minFn="22" item="F22 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="56" default="31" minFn="23" item="F23 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="57" default="8" minFn="24" item="F24 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="58" default="20" minFn="25" item="F25 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="59" default="40" minFn="26" item="F26 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="60" default="41" minFn="27" item="F27 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="61" default="18" minFn="28" item="F28 Output Function">
        <xi:include href="http://jmri.org/xml/decoders/bli/P3FunctionChoiceDiesel.xml"/>
      </variable>
      <variable CV="154" default="100" item="Sound Setting 25">
        <decVal/>
        <label>Track/Pantograph Volume</label>
      </variable>
      <variable item="Global lighting option 2" CV="159" mask="XXXXXVXX" default="0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-OnOff.xml"/>
        <label>L1/Headlight Power Up State</label>
      </variable>
      <variable CV="201" default="12" item="Sound Setting 38">
        <decVal max="255"/>
        <label>Load Motor Last Step</label>
      </variable>
      <variable item="HO Gauge Rev Level Motor Power Scalar" CV="203" default="6">
        <decVal max="255"/>
        <label>HO Gauge Rev Level Motor Power Scalar</label>
      </variable>
      <variable CV="204" default="1" item="Sound Setting 35">
        <decVal max="255"/>
        <label>Initial RevUp</label>
      </variable>
      <variable item="Aux Select for DCMaster" CV="222" default="0">
        <enumVal>
          <enumChoice value="0">
            <choice>Nothing</choice>
          </enumChoice>
          <enumChoice value="1">
            <choice>Front/Rear Lights</choice>
          </enumChoice>
          <enumChoice value="2">
            <choice>Bell Sound</choice>
          </enumChoice>
          <enumChoice value="3">
            <choice>Horn Sound</choice>
          </enumChoice>
          <enumChoice value="4">
            <choice>Couple/Uncouple Sound</choice>
          </enumChoice>
          <enumChoice value="5">
            <choice>Compressor/Grid Blower Sound</choice>
          </enumChoice>
          <enumChoice value="6">
            <choice>Diesel Ramp Up</choice>
          </enumChoice>
          <enumChoice value="7">
            <choice>Diesel Ramp Down/Start Diesel Sound</choice>
          </enumChoice>
          <enumChoice value="8">
            <choice>L1 Function</choice>
          </enumChoice>
          <enumChoice value="9">
            <choice>Mute/Volume Control</choice>
          </enumChoice>
          <enumChoice value="10">
            <choice>Startup/Shutdown Sounds</choice>
          </enumChoice>
          <enumChoice value="11">
            <choice>Cooling Fan Sound</choice>
          </enumChoice>
          <enumChoice value="12">
            <choice>Air Fill/Air Release Sound</choice>
          </enumChoice>
          <enumChoice value="13">
            <choice>Brake Set/Release/Squeal Sound</choice>
          </enumChoice>
          <enumChoice value="14">
            <choice>Fuel Fill Sound</choice>
          </enumChoice>
          <enumChoice value="15">
            <choice>Spit Valve Sound</choice>
          </enumChoice>
          <enumChoice value="16">
            <choice>Wheel Flange Sound</choice>
          </enumChoice>
          <enumChoice value="17">
            <choice>Coupler Slack/Couple Sound </choice>
          </enumChoice>
          <enumChoice value="18">
            <choice>Brake Squeal Sound</choice>
          </enumChoice>
          <enumChoice value="19">
            <choice>Horn2 Toggle</choice>
          </enumChoice>
          <enumChoice value="20">
            <choice>Complete Horn</choice>
          </enumChoice>
          <enumChoice value="21">
            <choice>Smoke Toggle</choice>
          </enumChoice>
          <enumChoice value="24">
            <choice>L4</choice>
          </enumChoice>
          <enumChoice value="25">
            <choice>L5</choice>
          </enumChoice>
          <enumChoice value="30">
            <choice>Horn Grade Crossing Sound</choice>
          </enumChoice>
          <enumChoice value="31">
            <choice>Track Sounds</choice>
          </enumChoice>
          <enumChoice value="40">
            <choice>Play Macro</choice>
          </enumChoice>
          <enumChoice value="41">
            <choice>Record Macro</choice>
          </enumChoice>
          <enumChoice value="50">
            <choice>Station Sounds</choice>
          </enumChoice>
          <enumChoice value="51">
            <choice>Yard Sounds</choice>
          </enumChoice>
          <enumChoice value="52">
            <choice>Maintenance Sounds</choice>
          </enumChoice>
          <enumChoice value="53">
            <choice>Radio Chatter Sounds</choice>
          </enumChoice>
          <enumChoice value="54">
            <choice>City Sounds</choice>
          </enumChoice>
          <enumChoice value="55">
            <choice>Farm Sounds</choice>
          </enumChoice>
          <enumChoice value="56">
            <choice>Industrial Sounds</choice>
          </enumChoice>
          <enumChoice value="57">
            <choice>Lumber Yard Sounds</choice>
          </enumChoice>
          <enumChoice value="60">
            <choice>Cab Light Toggle</choice>
          </enumChoice>
          <enumChoice value="61">
            <choice>Rule 17 Dimming Toggle</choice>
          </enumChoice>
        </enumVal>
        <label>Aux Select for DCMaster</label>
      </variable>
      <variable item="Smoke Unit Power On Delay" CV="233" default="2">
        <decVal/>
        <label>Smoke Unit Power On Delay</label>
      </variable>
      <variable item="Smoke Unit Fan Minimal Speed" CV="234" default="2">
        <decVal/>
        <label>Smoke Unit Fan Minimal Speed</label>
      </variable>
      <variable item="Smoke Unit Fan Maximum Speed" CV="235" default="249">
        <decVal/>
        <label>Smoke Unit Fan Maximum Speed</label>
      </variable>
      <variable item="Smoke Unit Minimal Heater Power" CV="236" default="2">
        <decVal max="110"/>
        <label>Smoke Unit Minimal Heater Power</label>
      </variable>
      <variable item="Smoke Unit Maximum Heater Power" CV="237" default="50">
        <decVal max="110"/>
        <label>Smoke Unit Maximum Heater Power</label>
      </variable>
      <variable item="Grid Blower Brake Motor Decrease" CV="244" mask="XXXXVXXX" default="0">
        <xi:include href="http://jmri.org/xml/decoders/parts/enum-enabledDisabled.xml"/>
      </variable>
      <variable item="Grid Blower Brake Motor Decrease Time" CV="244" mask="VVVXXXXX" default="1">
        <decVal max="7"/>
        <label>Grid Blower Brake Motor Decrease Time</label>
      </variable>
    </variables>
    <resets>
      <factReset label="Reset All CVs Unless Locked" CV="8" default="8"/>
      <factReset label="Load and Save Factory Macro" CV="8" default="10"/>
      <factReset label="Save Recorded Macro" CV="8" default="16"/>
      <factReset label="Set F0-F12 To Match Blue Line" CV="8" default="38"/>
      <factReset label="Set F0-F12 To Match QSI" CV="8" default="113"/>
      <factReset label="Set F0-F12 To Match SoundTraxx" CV="8" default="141"/>
      <factReset label="Reset All CVs Even If Decoder Locked" CV="8" default="254"/>
    </resets>
  </decoder>
  <xi:include href="http://jmri.org/xml/decoders/bli/PxPaneFunction.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/bli/PxPaneDCC.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/bli/PxPaneDC.xml"/>
  <xi:include href="http://jmri.org/xml/decoders/bli/PxPaneSettings.xml"/>
</decoder-config>
