From dd9a493df3ab1193d2a33efb2563e8bf6ec09388 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Mon, 26 Nov 2018 23:32:11 +0100 Subject: [PATCH] lorawan.cpp: small code sanitizations --- src/lorawan.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 50046767..241ba04d 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -400,17 +400,14 @@ esp_err_t lora_stack_init() { ESP_LOGI(TAG, "Starting LMIC..."); - // initialize runtime env, don't die mysteriously; die noisily. const lmic_pinmap *pPinMap = Arduino_LMIC::GetPinmap_ThisBoard(); - if (pPinMap == nullptr) { - ESP_LOGE(TAG, "LoRa chip not found. Aborting."); + ESP_LOGE(TAG, "No device pinmap found. Aborting."); return ESP_FAIL; } - os_init_ex(pPinMap); - // os_init(); // initialize lmic run-time environment on core 1 - LMIC_reset(); // initialize lmic MAC + os_init_ex(pPinMap); // initialize lmic run-time environment on core 1 + LMIC_reset(); // initialize lmic MAC LMIC_setLinkCheckMode(0); // This tells LMIC to make the receive windows bigger, in case your clock is // faster or slower. This causes the transceiver to be earlier switched on,