001/*
002 * Copyright (C) Cross The Road Electronics.  All rights reserved.
003 * License information can be found in CTRE_LICENSE.txt
004 * For support and suggestions contact support@ctr-electronics.com or file
005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
006 */
007package com.ctre.phoenix6.signals;
008
009import java.util.HashMap;
010
011/**
012 * The output mode of the differential PID controller.
013 */
014public enum DiffPIDOutput_PIDOutputModeValue
015{
016    DutyCycle(0),
017    Voltage(1),
018    TorqueCurrentFOC(2),;
019
020    public final int value;
021
022    DiffPIDOutput_PIDOutputModeValue(int initValue)
023    {
024        this.value = initValue;
025    }
026
027    private static HashMap<Integer, DiffPIDOutput_PIDOutputModeValue> _map = null;
028    static
029    {
030        _map = new HashMap<Integer, DiffPIDOutput_PIDOutputModeValue>();
031        for (DiffPIDOutput_PIDOutputModeValue type : DiffPIDOutput_PIDOutputModeValue.values())
032        {
033            _map.put(type.value, type);
034        }
035    }
036
037    /**
038     * Gets DiffPIDOutput_PIDOutputModeValue from specified value
039     * @param value Value of DiffPIDOutput_PIDOutputModeValue
040     * @return DiffPIDOutput_PIDOutputModeValue of specified value
041     */
042    public static DiffPIDOutput_PIDOutputModeValue valueOf(int value)
043    {
044        DiffPIDOutput_PIDOutputModeValue retval = _map.get(value);
045        if (retval != null) return retval;
046        return DiffPIDOutput_PIDOutputModeValue.values()[0];
047    }
048}