# Configuration To use any of these, call the corresponding method before OxConfig.initialize() in your robot init method. Example: ```java OxConfig.setLoggingMode(LoggingMode.Info); OxConfig.setEditMode(EditMode.Locked); OxConfig.setEnsureMode(EnsureMode.Safe); OxConfig.setModeList("Mode 1", "Mode 2", "Mode 3" /* ... */); OxConfig.initialize(); ``` ## EditMode ### Unrestricted (Default) Allows editng via the NT interface and using reloadFromDisk(). ```java OxConfig.setEditMode(EditMode.Unrestricted); ``` ### FileOnly If you do not plan to use Advantagescope-3044, this will disable the NT interface entirely. ```java OxConfig.setEditMode(EditMode.FileOnly); ``` ### Locked Intended for use during competition. Disables the NT interface and blocks all calls to `reloadFromDisk()`. ```java OxConfig.setEditMode(EditMode.Locked); ``` ## EnsureMode Ensure mode changes the behavior of ensuring keys. Depending on your configuration, it can make OxConfig more resistent to damages in the file, but slower. ### Startup (Default) While considered generally safe, it is not recommended if you plan to edit the file directly. Skips ensure checks at runtime, but not startup. ```java OxConfig.setEnsureMode(EnsureMode.Startup); // Not required since Startup is default ``` ### Always Always ensures keys exist, making it resistent to damages in the file at the cost of speed. ```java OxConfig.setFastMode(EnsureMode.Always); ``` ### Never (**NOT RECOMMENDED**) Skips all ensure checks entirely, including at startup. If you add a new parameter/class while this mode is enabled, it will not be added to the config file properly and issues will occur. ```java OxConfig.setEnsureMode(EnsureMode.Never); ``` ## Modes ```java OxConfig.setModeList(modes...) ``` Supply a list of modes you want to use with OxConfig. Simulation will automatically be appended if not in the list already, and all modes will be converted to lowercase if not already. ## LoggingMode ### None (Not recommended) OxConfig will be silent (even for errors). ```java OxConfig.setLoggingMode(LoggingMode.None); ``` ### Errors Only log errors. ```java OxConfig.setLoggingMode(LoggingMode.Errors); ``` ### Warnings (Default) Log errors and warnings. ```java OxConfig.setLoggingMode(LoggingMode.Warnings); ``` ### Info Log everything from OxConfig. Primarily used for debugging. ```java OxConfig.setLoggingMode(LoggingMode.Info); ``` ## Minfication Minify the json files so there is no unneccesary indentation ```java OxConfig.enableMinifyJSON(); ``` ## Profiling Enable profiling (timing certain actions, in miliseconds.) ### Use NT Sends Profiling data to /OxConfig/Profiling ```java OxConfig.enableProfiling(true) ``` ### Use Console Displays profiling via `System.out.println()` ```java OxConfig.enableProfiling(false) ```