Class ConfigManager
java.lang.Object
org.photonvision.common.configuration.ConfigManager
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCameraConfigurations
(List<VisionSource> sources) void
void
Disable flushing settings to disk as part of our JVM exit hook.getCalibrationImageSavePath
(String uniqueCameraName) getCalibrationImageSavePathWithRes
(org.opencv.core.Size frameSize, String uniqueCameraName) static ConfigManager
Get (and create if not present) the subfolder where ML models are storedvoid
load()
logFnameToDate
(String fname) static boolean
void
void
void
saveModule
(CameraConfiguration config, String uniqueName) void
boolean
saveUploadedAprilTagFieldLayout
(Path uploadPath) boolean
saveUploadedHardwareConfig
(Path uploadPath) boolean
saveUploadedHardwareSettings
(Path uploadPath) boolean
saveUploadedNetworkConfig
(Path uploadPath) static boolean
saveUploadedSettingsZip
(File uploadPath) void
setNetworkSettings
(NetworkConfig networkConfig) void
setWriteTaskEnabled
(boolean enabled) Prevent pending automatic savestaToLogFname
(TemporalAccessor date) void
-
Field Details
-
HW_CFG_FNAME
- See Also:
-
HW_SET_FNAME
- See Also:
-
NET_SET_FNAME
- See Also:
-
LOG_PREFIX
- See Also:
-
LOG_EXT
- See Also:
-
LOG_DATE_TIME_FORMAT
- See Also:
-
-
Method Details
-
getInstance
-
nukeConfigDirectory
public static boolean nukeConfigDirectory() -
saveUploadedSettingsZip
-
getConfig
-
load
public void load() -
addCameraConfigurations
-
saveModule
-
getSettingsFolderAsZip
-
setNetworkSettings
-
getLogsDir
-
getCalibDir
-
taToLogFname
-
logFnameToDate
- Throws:
ParseException
-
getLogPath
-
getImageSavePath
-
getCalibrationImageSavePath
-
getCalibrationImageSavePathWithRes
-
saveUploadedHardwareConfig
-
saveUploadedHardwareSettings
-
saveUploadedNetworkConfig
-
saveUploadedAprilTagFieldLayout
-
requestSave
public void requestSave() -
unloadCameraConfigs
public void unloadCameraConfigs() -
clearConfig
public void clearConfig() -
saveToDisk
public void saveToDisk() -
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()
-