mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-06-21 02:25:25 +02:00
Merge pull request #295 from theshaun/dev
Update Femtofox radio settings + fix setup
This commit is contained in:
+1
-3
@@ -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,
|
||||
|
||||
@@ -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