001/* Copyright (C) Cross The Road Electronics 2024 */ 002package com.ctre.phoenix; 003 004/** 005 * Configurables for any custom param configs 006 */ 007public abstract class CustomParamConfiguration{ 008 /** 009 * Custom Param 0 010 */ 011 public int customParam0; 012 /** 013 * Custom Param 1 014 */ 015 public int customParam1; 016 /** 017 * Enable optimizations for ConfigAll (defaults true) 018 */ 019 public boolean enableOptimizations; 020 021 public CustomParamConfiguration() { 022 customParam0 = 0; 023 customParam1 = 0; 024 enableOptimizations = true; 025 } 026 027 /** 028 * @return string representation of currently selected configs 029 */ 030 public String toString() { 031 return toString(""); 032 } 033 034 /** 035 * @param prependString String to prepend to all the configs 036 * @return string representation fo currently selected configs 037 */ 038 public String toString(String prependString) { 039 String retstr = prependString + ".customParam0 = " + String.valueOf(customParam0) + ";\n"; 040 retstr += prependString + ".customParam1 = " + String.valueOf(customParam1) + ";\n"; 041 042 return retstr; 043 } 044 045}