From 795dabfd06f1fd822dfc96a4d49d2373f97ec244 Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Sat, 29 Feb 2020 16:05:32 -0800 Subject: [PATCH] set BW, CR on init --- main/esp32-lora.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/esp32-lora.c b/main/esp32-lora.c index bb6df75..91cd387 100644 --- a/main/esp32-lora.c +++ b/main/esp32-lora.c @@ -413,6 +413,12 @@ uint8_t lora32_init(lora32_cfg_t *lora) { lora32_set_frequency(lora, lora->frequency); ESP_LOGI(TAG, "lora32_set_frequency: %lu", lora->frequency); + lora32_set_bandwidth(lora, lora->bandwidth); + ESP_LOGI(TAG, "lora32_set_bandwidth: %d", lora->bandwidth); + + lora32_set_coding_rate(lora, lora->codingRate); + ESP_LOGI(TAG, "lora32_set_codingRate: %d", lora->codingRate); + lora32_write_reg(lora, REG_FIFO_TX_BASE_ADDR, 0x00); lora32_write_reg(lora, REG_FIFO_RX_BASE_ADDR, 0x00); ESP_LOGI(TAG, "clear rx/tx fifos");