001package jmri.jmrix.bachrus.speedmatcher.speedStepScale;
002
003import javax.swing.JButton;
004import javax.swing.JLabel;
005
006import jmri.DccLocoAddress;
007import jmri.PowerManager;
008import jmri.jmrix.bachrus.Speed;
009import jmri.jmrix.bachrus.speedmatcher.SpeedMatcherConfig;
010
011/**
012 * Configuration data for a speed step scale speed matcher
013 *
014 * @author Todd Wegter Copyright (C) 2024
015 */
016public class SpeedStepScaleSpeedMatcherConfig extends SpeedMatcherConfig {
017
018    //<editor-fold defaultstate="collapsed" desc="Enums">
019    public enum SpeedTable {
020        ADVANCED, ESU
021    }
022    //</editor-fold>
023
024    //<editor-fold defaultstate="collapsed" desc="Instance Variables">
025    public SpeedTableStepSpeed targetMaxSpeedStep;
026    public JLabel actualMaxSpeedField;
027    //</editor-fold>
028
029    /**
030     * Create a config object for a Speed Step Scale Speed Matcher
031     *
032     * @param address              Address of locomotive to speed match
033     * @param targetMaxSpeedStep   Target maximum speed step (corresponds to
034     *                             maximum speed)
035     * @param speedUnit            Speed.Unit to speed match the locomotive in
036     * @param trimReverseSpeed     Set to true to trim the locomotive's reverse
037     *                             speed, false otherwise
038     * @param warmUpForwardSeconds Number of seconds to warm up the locomotive
039     *                             before forward speed matching; set to 0 to
040     *                             skip the forward warm up
041     * @param warmUpReverseSeconds Number of seconds to warm up the locomotive
042     *                             before trimming revers speed; set to 0 to
043     *                             skip the reverse warm up
044     * @param powerManager         PowerManager for turning on the DCC system
045     *                             power
046     * @param statusLabel          JLabel status label in the SpeedoConsoleFrame
047     * @param actualMaxSpeedField  JLabel for indicating the locomotive's actual
048     *                             max speed
049     * @param startStopButton      JButton for starting and stopping speed
050     *                             matching
051     */
052    public SpeedStepScaleSpeedMatcherConfig(
053            DccLocoAddress address,
054            SpeedTableStepSpeed targetMaxSpeedStep,
055            Speed.Unit speedUnit,
056            boolean trimReverseSpeed,
057            int warmUpForwardSeconds,
058            int warmUpReverseSeconds,
059            PowerManager powerManager,
060            JLabel statusLabel,
061            JLabel actualMaxSpeedField,
062            JButton startStopButton) {
063        super(address, speedUnit, trimReverseSpeed, warmUpForwardSeconds, warmUpReverseSeconds, powerManager, statusLabel, startStopButton);
064
065        this.targetMaxSpeedStep = targetMaxSpeedStep;
066        this.actualMaxSpeedField = actualMaxSpeedField;
067    }
068
069}