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