added export config and user define config support

This commit is contained in:
unknown
2025-12-30 10:53:25 +08:00
parent 93e2984e7f
commit 88b48f8fa8
5 changed files with 121 additions and 13 deletions
+5 -4
View File
@@ -417,9 +417,12 @@ class Sensor:
# Public API - Configuration & Calibration
# =========================================================================
def get_config(self):
def export_config(self, path="./config/exported_config.json"):
"""Return current configuration dict."""
return self.config
configs.export_config(self.config, path)
if self.verbose:
print(f"Config exported to {path}")
return True
def stitch_cal(self):
"""
@@ -462,8 +465,6 @@ class Sensor:
self.config_stitcher = self.config["stitcher"]
self.config_contact = self.config["contact"]
if self.verbose:
print(f"Config: {self.config_name}")
print(f" Resolution: {self.config_resolution_raw} → {self.config_resolution_stitch}")