From e1e586368849ada17ea911370e0f70fb51133c50 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Sat, 29 Aug 2026 22:45:37 +0200 Subject: [PATCH] cleanup unused variable --- zephcore/patches/zephyr/0003-lora-sx126x-native.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zephcore/patches/zephyr/0003-lora-sx126x-native.patch b/zephcore/patches/zephyr/0003-lora-sx126x-native.patch index 37513ef..f9d75df 100644 --- a/zephcore/patches/zephyr/0003-lora-sx126x-native.patch +++ b/zephcore/patches/zephyr/0003-lora-sx126x-native.patch @@ -553,7 +553,7 @@ Regenerate with: appended to this preamble. diff --git a/drivers/lora/native/sx126x/sx126x.c b/drivers/lora/native/sx126x/sx126x.c -index 30243ba5dc7..aa0732b1de9 100644 +index 30243ba5dc7..16823387b1d 100644 --- a/drivers/lora/native/sx126x/sx126x.c +++ b/drivers/lora/native/sx126x/sx126x.c @@ -6,72 +6,220 @@ @@ -2674,9 +2674,9 @@ index 30243ba5dc7..aa0732b1de9 100644 +static int sx126x_do_cad(const struct device *dev, struct sx126x_data *data) +{ + struct lora_modem_config *mc = &data->config; -+ uint8_t sf = (uint8_t)mc->datarate; -+ /* Both the table lookup and the timeout need the symbol count, so it is -+ * resolved before the base peak rather than after it. */ ++ /* No local sf: sx126x_cad_base_peak_cfg() reads the SF, bandwidth and ++ * symbol count off mc itself, which is what keeps it agreeing with ++ * sx126x_cad_base_peak() and sx126x_cad_probe(). */ + uint8_t symb_nb = mc->cad.symbol_num ? (uint8_t)mc->cad.symbol_num : 2; + uint8_t detect_peak = sx126x_cad_base_peak_cfg(mc); + int ret;