diff --git a/radio-settings.json b/radio-settings.json index 32c87af..be599e1 100644 --- a/radio-settings.json +++ b/radio-settings.json @@ -136,7 +136,6 @@ "cs_id": 0, "cs_pin": 16, "gpio_chip": 1, - "use_gpiod_backend": true, "reset_pin": 25, "busy_pin": 22, "irq_pin": 23, @@ -144,7 +143,7 @@ "rxen_pin": 24, "txled_pin": -1, "rxled_pin": -1, - "tx_power": 30, + "tx_power": 22, "use_dio3_tcxo": true, "preamble_length": 32 }, @@ -154,7 +153,6 @@ "cs_id": 0, "cs_pin": 16, "gpio_chip": 1, - "use_gpiod_backend": true, "reset_pin": 25, "busy_pin": 22, "irq_pin": 23, diff --git a/repeater/web/api_endpoints.py b/repeater/web/api_endpoints.py index 5dad39a..f8f26c3 100644 --- a/repeater/web/api_endpoints.py +++ b/repeater/web/api_endpoints.py @@ -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)