lorawan.cpp: small code sanitizations

This commit is contained in:
Klaus K Wilting 2018-11-26 23:32:11 +01:00
parent 556790082c
commit dd9a493df3

View File

@ -400,16 +400,13 @@ esp_err_t lora_stack_init() {
ESP_LOGI(TAG, "Starting LMIC..."); ESP_LOGI(TAG, "Starting LMIC...");
// initialize runtime env, don't die mysteriously; die noisily.
const lmic_pinmap *pPinMap = Arduino_LMIC::GetPinmap_ThisBoard(); const lmic_pinmap *pPinMap = Arduino_LMIC::GetPinmap_ThisBoard();
if (pPinMap == nullptr) { if (pPinMap == nullptr) {
ESP_LOGE(TAG, "LoRa chip not found. Aborting."); ESP_LOGE(TAG, "No device pinmap found. Aborting.");
return ESP_FAIL; return ESP_FAIL;
} }
os_init_ex(pPinMap); os_init_ex(pPinMap); // initialize lmic run-time environment on core 1
// os_init(); // initialize lmic run-time environment on core 1
LMIC_reset(); // initialize lmic MAC LMIC_reset(); // initialize lmic MAC
LMIC_setLinkCheckMode(0); LMIC_setLinkCheckMode(0);
// This tells LMIC to make the receive windows bigger, in case your clock is // This tells LMIC to make the receive windows bigger, in case your clock is