json update

This commit is contained in:
bluepulsar
2025-12-25 17:04:11 +08:00
parent eab0294f5b
commit 065b05f895
4 changed files with 21 additions and 34 deletions
+1 -16
View File
@@ -29,19 +29,4 @@ def load_config(config_name: str):
with open(config_path, 'r') as f:
return json.load(f)
def save_config(config: dict, config_name: str):
"""
Save sensor configuration to JSON file.
Args:
config: Dictionary containing the configuration
config_name: Name of the config file (without .json extension)
Returns:
Path to the saved config file
"""
config_path = CONFIG_DIR / f"{config_name}.json"
with open(config_path, 'w') as f:
json.dump(config, f, indent=4)
return config_path