mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-07 09:23:06 +02:00
Resolve gpio_chip + use_gpiod_backend not being set during setup
This commit is contained in:
Submodule
+1
Submodule GITpyMC_core added at 5649ffe04c
@@ -1342,6 +1342,12 @@ class APIEndpoints:
|
||||
config_yaml["sx1262"]["use_dio2_rf"] = hw_config.get("use_dio2_rf", False)
|
||||
if "is_waveshare" in hw_config:
|
||||
config_yaml["sx1262"]["is_waveshare"] = hw_config.get("is_waveshare", False)
|
||||
if "gpio_chip" in hw_config:
|
||||
config_yaml["sx1262"]["gpio_chip"] = hw_config.get("gpio_chip", 0)
|
||||
if "use_gpiod_backend" in hw_config:
|
||||
config_yaml["sx1262"]["use_gpiod_backend"] = hw_config.get(
|
||||
"use_gpiod_backend", False
|
||||
)
|
||||
# Write updated config
|
||||
with open(self._config_path, "w") as f:
|
||||
yaml.dump(config_yaml, f, default_flow_style=False, sort_keys=False)
|
||||
|
||||
Reference in New Issue
Block a user