Class ConfigManager

java.lang.Object
org.photonvision.common.configuration.ConfigManager

public class ConfigManager extends Object
  • Field Details

  • Method Details

    • getInstance

      public static ConfigManager getInstance()
    • nukeConfigDirectory

      public static boolean nukeConfigDirectory()
    • saveUploadedSettingsZip

      public static boolean saveUploadedSettingsZip(File uploadPath)
    • getConfig

      public PhotonConfiguration getConfig()
    • load

      public void load()
    • addCameraConfigurations

      public void addCameraConfigurations(List<VisionSource> sources)
    • saveModule

      public void saveModule(CameraConfiguration config, String uniqueName)
    • getSettingsFolderAsZip

      public File getSettingsFolderAsZip()
    • setNetworkSettings

      public void setNetworkSettings(NetworkConfig networkConfig)
    • getLogsDir

      public Path getLogsDir()
    • getCalibDir

      public Path getCalibDir()
    • taToLogFname

      public String taToLogFname(TemporalAccessor date)
    • logFnameToDate

      public Date logFnameToDate(String fname) throws ParseException
      Throws:
      ParseException
    • getLogPath

      public Path getLogPath()
    • getImageSavePath

      public Path getImageSavePath()
    • getCalibrationImageSavePath

      public Path getCalibrationImageSavePath(String uniqueCameraName)
    • getCalibrationImageSavePathWithRes

      public Path getCalibrationImageSavePathWithRes(org.opencv.core.Size frameSize, String uniqueCameraName)
    • saveUploadedHardwareConfig

      public boolean saveUploadedHardwareConfig(Path uploadPath)
    • saveUploadedHardwareSettings

      public boolean saveUploadedHardwareSettings(Path uploadPath)
    • saveUploadedNetworkConfig

      public boolean saveUploadedNetworkConfig(Path uploadPath)
    • saveUploadedAprilTagFieldLayout

      public boolean saveUploadedAprilTagFieldLayout(Path uploadPath)
    • requestSave

      public void requestSave()
    • unloadCameraConfigs

      public void unloadCameraConfigs()
    • clearConfig

      public void clearConfig()
    • saveToDisk

      public void saveToDisk()
    • getModelsDirectory

      public File getModelsDirectory()
      Get (and create if not present) the subfolder where ML models are stored
    • disableFlushOnShutdown

      public void disableFlushOnShutdown()
      Disable flushing settings to disk as part of our JVM exit hook. Used to prevent uploading all settings from getting its new configs overwritten at program exit and before they're all loaded.
    • setWriteTaskEnabled

      public void setWriteTaskEnabled(boolean enabled)
      Prevent pending automatic saves
    • onJvmExit

      public void onJvmExit()