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.phoenixpro.configs;
008
009import com.ctre.phoenix6.StatusCode;
010import com.ctre.phoenix6.configs.jni.ConfigJNI;
011import com.ctre.phoenix6.spns.*;
012
013/**
014 *  Configs that directly affect motor-output.
015 * <p>
016 *  Includes Motor Invert and various limit features.
017 *
018 * @deprecated Classes in the phoenixpro package will be removed in 2024.
019 *             Users should instead use classes from the phoenix6 package.
020 */
021@Deprecated(forRemoval = true)
022public class AudioConfigs implements ParentConfiguration
023{
024    /**
025     * If true, the TalonFX will beep during boot-up.  This is useful for
026     * general debugging, and defaults to true.  If rotor is moving during
027     * boot-up, the beep will not occur regardless of this setting.
028     *
029     *  <ul>
030     *  <li> <b>Default Value:</b> True
031     *  </ul>
032     */
033    public boolean BeepOnBoot = true;
034
035    @Override
036    public String toString()
037    {
038        String ss = "Config Group: Audio\n";
039        ss += "Name: \"BeepOnBoot\" Value: \"" + BeepOnBoot + "\"" + "\n";
040        return ss;
041    }
042
043    /**
044     *
045     */
046    public StatusCode deserialize(String string)
047    {
048        BeepOnBoot = ConfigJNI.Deserializeboolean(SpnValue.Config_BeepOnBoot.value, string);
049        return  StatusCode.OK;
050    }
051
052    /**
053     *
054     */
055    public String serialize()
056    {
057        String ss = "";
058        ss += ConfigJNI.Serializeboolean(1424, BeepOnBoot);
059        return ss;
060    }
061}
062