added export config and user define config support
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user