set BW, CR on init

This commit is contained in:
Morgan 'ARR\!' Allen 2020-02-29 16:05:32 -08:00
parent f581b74251
commit 795dabfd06

View file

@ -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");