sync
This commit is contained in:
@@ -6,7 +6,9 @@ import yaml
|
||||
DEFAULT_CONFIG = {
|
||||
"port": None,
|
||||
"baudrate": 115200,
|
||||
"timeout": 5.0
|
||||
"timeout": 5.0,
|
||||
"crc_timeout_min_seconds": 2.0,
|
||||
"crc_timeout_ms_per_100kb": 1.5,
|
||||
}
|
||||
|
||||
def load_config(cli_args=None):
|
||||
@@ -26,6 +28,12 @@ def load_config(cli_args=None):
|
||||
config["port"] = yaml_data["serial"].get("port", config["port"])
|
||||
config["baudrate"] = yaml_data["serial"].get("baudrate", config["baudrate"])
|
||||
config["timeout"] = yaml_data["serial"].get("timeout", config["timeout"])
|
||||
config["crc_timeout_min_seconds"] = yaml_data["serial"].get(
|
||||
"crc_timeout_min_seconds", config["crc_timeout_min_seconds"]
|
||||
)
|
||||
config["crc_timeout_ms_per_100kb"] = yaml_data["serial"].get(
|
||||
"crc_timeout_ms_per_100kb", config["crc_timeout_ms_per_100kb"]
|
||||
)
|
||||
except Exception as e:
|
||||
print(f"Fehler beim Laden der Konfigurationsdatei {yaml_path}: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user